You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Shalin Shekhar Mangar <sh...@gmail.com> on 2009/07/24 10:43:45 UTC

Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...

On Fri, Jul 24, 2009 at 2:01 PM, prerna07 <pk...@sapient.com> wrote:

>
> HI all,
>
> I am also using Phonetic filter factory but it is behaving very weird.
>
> Issue:
> 1) I have total 10400 indexes but when i search for *:* it return me only
> 288 results. AS soon as i remove phonetic filter factory from <analyzer
> type="query"> it start working correctly.


> Can someone help me understand the issue with filter factory?
>

I think you mean you have 10400 documents. If a query of *:* returns
numFound=288 then you actually have only 288 documents. It is very difficult
to tell what is wrong without knowing your schema and uniqueKey. Does the
uniqueKey of your documents have phonetic filter applied on it? It is best
to keep uniqueKeys un-tokenized.


>
> 2) Search on any valid integer value return me full set of records, again i
> am not able to understand why ?
>

What is the defaultSearchField? Which field are you searching the integer
value on?


-- 
Regards,
Shalin Shekhar Mangar.

Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 24, 2009, at 9:59 AM, prerna07 wrote:
> I have recreated indexes with phonetic filter factory but i am still  
> facing
> below mentioned issue. Please let me know if i am missing something:
>
> I am searching for product_12345 string, which is present in only one
> record.
>
> Issue: Solr return me all indexes which have product_ i.e. it ignore  
> the
> string present after _.
>
> Also debugQuery looks like :
> <lst name="debug">
>  <str name="rawquerystring">product_4844308</str>
>  <str name="querystring">product_4844308</str>
>  <str name="parsedquery">PhraseQuery(all:"PRTK ")</str>
>  <str name="parsedquery_toString">all:"PRTK "</str>
>
> Why is the query showing PRTK ?
>
> Also when i use Dismaxrequest it shows:
>
> <arr name="parsed_boost_queries">
>  <str>all:ANKL^90.0 all:HNT^123.0 all:KLRS^2000.0 all:HLT^1.0E7
> all:M0^100.0 all:KLR^100000.0</str>
>  </arr>
>
> Why is this showing ANKL, HNT, KLRS..... ?
>
> Why does solr convert search string to  ANKL, HNT, KLRS ... strings?

The phonetic filters convert words (not numbers) into a representation  
of the "sounds".  That is why "product" converted to PRTK above, and  
likewise with your dismax query test.  This is why both indexing and  
querying phonetic filtering is necessary - in order to get matches as  
expected.

If you want to search on literally "product_12345" you will want to  
adjust your analysis process (and likely have some copyFields to  
analyze text different ways).  Experiment with the analysis.jsp of  
Solr's admin to see how various tweaks to analyzers and field types  
change what gets indexed and queried for.

	Erik


Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...

Posted by prerna07 <pk...@sapient.com>.
I have recreated indexes with phonetic filter factory but i am still facing
below mentioned issue. Please let me know if i am missing something:

I am searching for product_12345 string, which is present in only one
record.

Issue: Solr return me all indexes which have product_ i.e. it ignore the
string present after _.

Also debugQuery looks like :
 <lst name="debug">
  <str name="rawquerystring">product_4844308</str>
  <str name="querystring">product_4844308</str>
  <str name="parsedquery">PhraseQuery(all:"PRTK ")</str>
  <str name="parsedquery_toString">all:"PRTK "</str>

Why is the query showing PRTK ?

Also when i use Dismaxrequest it shows:

<arr name="parsed_boost_queries">
  <str>all:ANKL^90.0 all:HNT^123.0 all:KLRS^2000.0 all:HLT^1.0E7
all:M0^100.0 all:KLR^100000.0</str>
  </arr>

Why is this showing ANKL, HNT, KLRS..... ?

Why does solr convert search string to  ANKL, HNT, KLRS ... strings? 


Erik Hatcher wrote:
> 
> 
> On Jul 24, 2009, at 4:53 AM, prerna07 wrote:
>> Does that mean my indexes should be created with phonetic filter  
>> factory in
>> my fieldTypes? Currently I am quering on text fields and phonetic  
>> factory is
>> defined for uery analyser only.
> 
> Yes, if you are applying the phonetic filter you need to do so at  
> indexing AND query time.  Just doing it at query time is not going to  
> find anything except purely by coincidence.
> 
> Erik
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Exception-thrown-when-searching-field-defined-with-PhoneticFilterFactory-filter...-tp24543240p24645057.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 24, 2009, at 4:53 AM, prerna07 wrote:
> Does that mean my indexes should be created with phonetic filter  
> factory in
> my fieldTypes? Currently I am quering on text fields and phonetic  
> factory is
> defined for uery analyser only.

Yes, if you are applying the phonetic filter you need to do so at  
indexing AND query time.  Just doing it at query time is not going to  
find anything except purely by coincidence.

	Erik


Re: Exception thrown when searching field defined with PhoneticFilterFactory filter...

Posted by prerna07 <pk...@sapient.com>.

Does that mean my indexes should be created with phonetic filter factory in
my fieldTypes? Currently I am quering on text fields and phonetic factory is
defined for uery analyser only.


Shalin Shekhar Mangar wrote:
> 
> On Fri, Jul 24, 2009 at 2:01 PM, prerna07 <pk...@sapient.com>
> wrote:
> 
>>
>> HI all,
>>
>> I am also using Phonetic filter factory but it is behaving very weird.
>>
>> Issue:
>> 1) I have total 10400 indexes but when i search for *:* it return me only
>> 288 results. AS soon as i remove phonetic filter factory from <analyzer
>> type="query"> it start working correctly.
> 
> 
>> Can someone help me understand the issue with filter factory?
>>
> 
> I think you mean you have 10400 documents. If a query of *:* returns
> numFound=288 then you actually have only 288 documents. It is very
> difficult
> to tell what is wrong without knowing your schema and uniqueKey. Does the
> uniqueKey of your documents have phonetic filter applied on it? It is best
> to keep uniqueKeys un-tokenized.
> 
> 
>>
>> 2) Search on any valid integer value return me full set of records, again
>> i
>> am not able to understand why ?
>>
> 
> What is the defaultSearchField? Which field are you searching the integer
> value on?
> 
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: http://www.nabble.com/Exception-thrown-when-searching-field-defined-with-PhoneticFilterFactory-filter...-tp24543240p24640981.html
Sent from the Solr - User mailing list archive at Nabble.com.