Leading Wildcard Support (ReversedWildcardFilterFactory)

2015-02-26 Thread jaime spicciati
All,
I am currently using 4.10.3 running Solr Cloud.

I have configured my index analyzer to leverage the
solr.ReversedWildcardFilterFactory with various settings for the
maxFractionAsterisk, maxPosAsterisk,etc. Currently I am running with the
defaults (ie not configured)

Using the Analysis capability in the Solr admin I see the Field Value
(Index) fields going in correctly, both normal order and reversed order.
However, on the Field Value (Query) side it is not generating a token
that is reversed as expected (no matter where I place the * in the leading
position of the search term). I also confirmed through the Query capability
with debugQuery turned on that the parsed query is not reversed as expected.

From my current understanding you do not need to have anything configured
on the index analyzer to make leading wildcards work as expected with the
reversedwildcardfilterfactory. The default query parser will know to look
at the index analyzer and leverage the ReversedWildcardFilterFactory
configuration if the term contains a leading wildcard. (This is what I have
read)

Without uploading my entire configuration to this email I was hoping
someone could point me in the right direction because I am at a loss at
this point.

Thanks!


Re: Leading Wildcard Support (ReversedWildcardFilterFactory)

2015-02-26 Thread Jack Krupansky
Please post your field type... or at least confirm a comparison to the
example in the javadoc:
http://lucene.apache.org/solr/4_10_3/solr-core/org/apache/solr/analysis/ReversedWildcardFilterFactory.html

-- Jack Krupansky

On Thu, Feb 26, 2015 at 2:38 PM, jaime spicciati jaime.spicci...@gmail.com
wrote:

 All,
 I am currently using 4.10.3 running Solr Cloud.

 I have configured my index analyzer to leverage the
 solr.ReversedWildcardFilterFactory with various settings for the
 maxFractionAsterisk, maxPosAsterisk,etc. Currently I am running with the
 defaults (ie not configured)

 Using the Analysis capability in the Solr admin I see the Field Value
 (Index) fields going in correctly, both normal order and reversed order.
 However, on the Field Value (Query) side it is not generating a token
 that is reversed as expected (no matter where I place the * in the leading
 position of the search term). I also confirmed through the Query capability
 with debugQuery turned on that the parsed query is not reversed as
 expected.

 From my current understanding you do not need to have anything configured
 on the index analyzer to make leading wildcards work as expected with the
 reversedwildcardfilterfactory. The default query parser will know to look
 at the index analyzer and leverage the ReversedWildcardFilterFactory
 configuration if the term contains a leading wildcard. (This is what I have
 read)

 Without uploading my entire configuration to this email I was hoping
 someone could point me in the right direction because I am at a loss at
 this point.

 Thanks!



Re: Leading Wildcard Support (ReversedWildcardFilterFactory)

2015-02-26 Thread Jack Krupansky
Most of the magic is done internal to the query parser which actually
inspects the index analyzer chain when a leading wildcard is present. Look
at the parsed_query in the debug response, and you should see that special
prefix query.

-- Jack Krupansky

On Thu, Feb 26, 2015 at 3:49 PM, jaime spicciati jaime.spicci...@gmail.com
wrote:

 Thanks for the quick response.

 The index I am currently testing with has the following configuration which
 is the default for the text_general_rev

 The field type is solr.TextField

 maxFractionAsterisk=.33
 maxPosAsterisk=3
 maxPosQuestion=2
 withOriginal=true

 Through additional review I think it *might *be working as expected even
 though the Analysis tab and debugQuery parsed query lead me to think
 otherwise. If I look at the explain plan from the debugQuery and I actually
 get a hit, I see word/word(s) that actually come back in reversed order
 with the \u0001 prefix character, so the actual hit against the inverted
 index appears to be correct even though the parsed query doesn't reflect
 this. Is it safe to say that things are in fact working correctly?

 Thanks again



 On Thu, Feb 26, 2015 at 3:34 PM, Jack Krupansky jack.krupan...@gmail.com
 wrote:

  Please post your field type... or at least confirm a comparison to the
  example in the javadoc:
 
 
 http://lucene.apache.org/solr/4_10_3/solr-core/org/apache/solr/analysis/ReversedWildcardFilterFactory.html
 
  -- Jack Krupansky
 
  On Thu, Feb 26, 2015 at 2:38 PM, jaime spicciati 
  jaime.spicci...@gmail.com
  wrote:
 
   All,
   I am currently using 4.10.3 running Solr Cloud.
  
   I have configured my index analyzer to leverage the
   solr.ReversedWildcardFilterFactory with various settings for the
   maxFractionAsterisk, maxPosAsterisk,etc. Currently I am running with
 the
   defaults (ie not configured)
  
   Using the Analysis capability in the Solr admin I see the Field Value
   (Index) fields going in correctly, both normal order and reversed
 order.
   However, on the Field Value (Query) side it is not generating a token
   that is reversed as expected (no matter where I place the * in the
  leading
   position of the search term). I also confirmed through the Query
  capability
   with debugQuery turned on that the parsed query is not reversed as
   expected.
  
   From my current understanding you do not need to have anything
 configured
   on the index analyzer to make leading wildcards work as expected with
 the
   reversedwildcardfilterfactory. The default query parser will know to
 look
   at the index analyzer and leverage the ReversedWildcardFilterFactory
   configuration if the term contains a leading wildcard. (This is what I
  have
   read)
  
   Without uploading my entire configuration to this email I was hoping
   someone could point me in the right direction because I am at a loss at
   this point.
  
   Thanks!
  
 



Re: Leading Wildcard Support (ReversedWildcardFilterFactory)

2015-02-26 Thread jaime spicciati
Thanks for the quick response.

The index I am currently testing with has the following configuration which
is the default for the text_general_rev

The field type is solr.TextField

maxFractionAsterisk=.33
maxPosAsterisk=3
maxPosQuestion=2
withOriginal=true

Through additional review I think it *might *be working as expected even
though the Analysis tab and debugQuery parsed query lead me to think
otherwise. If I look at the explain plan from the debugQuery and I actually
get a hit, I see word/word(s) that actually come back in reversed order
with the \u0001 prefix character, so the actual hit against the inverted
index appears to be correct even though the parsed query doesn't reflect
this. Is it safe to say that things are in fact working correctly?

Thanks again



On Thu, Feb 26, 2015 at 3:34 PM, Jack Krupansky jack.krupan...@gmail.com
wrote:

 Please post your field type... or at least confirm a comparison to the
 example in the javadoc:

 http://lucene.apache.org/solr/4_10_3/solr-core/org/apache/solr/analysis/ReversedWildcardFilterFactory.html

 -- Jack Krupansky

 On Thu, Feb 26, 2015 at 2:38 PM, jaime spicciati 
 jaime.spicci...@gmail.com
 wrote:

  All,
  I am currently using 4.10.3 running Solr Cloud.
 
  I have configured my index analyzer to leverage the
  solr.ReversedWildcardFilterFactory with various settings for the
  maxFractionAsterisk, maxPosAsterisk,etc. Currently I am running with the
  defaults (ie not configured)
 
  Using the Analysis capability in the Solr admin I see the Field Value
  (Index) fields going in correctly, both normal order and reversed order.
  However, on the Field Value (Query) side it is not generating a token
  that is reversed as expected (no matter where I place the * in the
 leading
  position of the search term). I also confirmed through the Query
 capability
  with debugQuery turned on that the parsed query is not reversed as
  expected.
 
  From my current understanding you do not need to have anything configured
  on the index analyzer to make leading wildcards work as expected with the
  reversedwildcardfilterfactory. The default query parser will know to look
  at the index analyzer and leverage the ReversedWildcardFilterFactory
  configuration if the term contains a leading wildcard. (This is what I
 have
  read)
 
  Without uploading my entire configuration to this email I was hoping
  someone could point me in the right direction because I am at a loss at
  this point.
 
  Thanks!