Hello:

I've been able to find little regarding my specific question by searching 
around.  The bottom line is that I'm issuing a cross index join query such as 
the following (from the log file):

...&q={!join+from%3DconceptId+to%3Did+fromIndex%3DSearchProducts0}parentProductId:PROD_Hs01_00179501

Prior to this, I was issuing this as a filter query (fq) where the from field 
(parentProductId) was of type solr.StrField.  This worked well since I want the 
actual search terms to be applied to the 'to index'.  But, I have a client who 
asked if it would be possible for the parent product ID to be specified in a 
case insensitive manner, with or w/o the underbar characters.  So, I figured I 
could add some index and query time analysis to the field to do that:

             <analyzer type="index">
                 <tokenizer class="solr.KeywordTokenizerFactory"/>
                 <!-- strip punctuation -->
                 <filter class="solr.PatternReplaceFilterFactory"
                         pattern="([\p{Punct}])" replacement="" replace="all"/>
                 <!-- Remove any 0-length tokens. -->
                 <filter class="solr.LengthFilterFactory" min="1" max="100"/>
                 <filter class="solr.LowerCaseFilterFactory"/>
             </analyzer>
             <analyzer type="query">
                 <tokenizer class="solr.KeywordTokenizerFactory"/>
                 <!-- strip punctuation -->
                 <filter class="solr.PatternReplaceFilterFactory"
                         pattern="([\p{Punct}])" replacement="" replace="all"/>
                 <!-- Remove any 0-length tokens. -->
                 <filter class="solr.LengthFilterFactory" min="1" max="100"/>
                 <filter class="solr.LowerCaseFilterFactory"/>
             </analyzer>
         </fieldType>

My filter query stopped working, but I found some references to the fact that 
query time analysis is not performed for filter queries.  I do use fq for a 
number of other fields, including faceting, and all are of the solr.StrField 
type, which make sense.

So, rather an fq, I figured I'd make use of the join via plain old q as an 
experiment.  Using the example value above, I do get a hit for 
prodhs0100179501, but not the original value or another flavor.  This 
particular blog 
(http://blog.trifork.com/2012/01/22/query-time-joining-in-lucene/) mentions 
near the end of the article about work yet to be done regarding the Lucene 
query time join:

        "Query time joining that uses doc values instead of the terms in the 
index. During text analysis the original text is in many cases changed. It 
might happen that your id is omitted or modified before it is added to the 
index..."

Seems I'm hitting that fact?  Is query time analysis of the search term not 
performed when using a join?  I'm using Solr 4.0 incorporated into DataStax 
Enterprise 2.2.3.

Thanks a lot!

Cheers,

Jeff
--
Jeff Schmidt
535 Consulting
j...@535consulting.com
http://www.535consulting.com









Reply via email to