Re: String field does not yield partial match result using qf parameter

2013-06-25 Thread Jan Høydahl
fieldType "string" is not tokenized, so your observation is correct. You need 
to use a fieldType with analysis and tokenization to get the behavior you want.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

25. juni 2013 kl. 02:35 skrev "Mugoma Joseph O." :

> 
> It looks like partial search works only with copied to field. This works:
> 
> $ curl
> "http://localhost:8282/solr/links/select?q=text_ngrams:yengas&wt=json&indent=on&fl=id,domain,score";
> 
> On Tue, June 25, 2013 12:39 am, Mugoma Joseph O. wrote:
>> Hello,
>> 
>> I am newbie to solr.
>> 
>> I am trying out partial search (match). My experience is opposite of
>> http://lucene.472066.n3.nabble.com/string-field-does-not-yield-exact-match-result-using-qf-parameter-td4060096.html
>> 
>> When I add 'qf' to to dismax query I get no result unless there's a full
>> match.
>> 
>> I am using NGramFilterFactory as follows:
>> 
>> 
>>   
>> 
>> > maxGramSize="15"/>
>>   
>>   
>> 
>>   
>> 
>> 
>> ...
>> 
>> 
>> > stored="false" multiValued="true" />
>> 
>> ...
>> 
>> 
>> 
>> ...
>> 
>> 
>> 
>> 
>> If I have yengas.com in indexed I can search for yengas.com but not
>> yengas. However, If I drop 'qf' I can search for yengas.
>> 
>> 
>> Example searches:
>> 
>> $ curl
>> "http://localhost:8282/solr/links/select?q=domain:yengas&wt=json&indent=on&fl=id,domain,score";
>> => "response":{"numFound":0,"start":0,"docs":[]
>> 
>> 
>> $ curl
>> "http://localhost:8282/solr/links/select?q=domain:yengas.com&wt=json&indent=on&fl=id,domain,score";
>> => "response":{"numFound":3,"start":0,"docs":[]
>> 
>> $ curl
>> "http://localhost:8282/solr/links/select?defType=dismax&q=yengas&qf=domain^4&pf=domain&ps=0&fl=id,domain,score";
>> => "response":{"numFound":0,"start":0,"docs":[]
>> 
>> 
>> $ curl
>> "http://localhost:8282/solr/links/select?defType=dismax&q=yengas.com&pf=domain&ps=0&fl=id,domain,score";
>> => "response":{"numFound":3,"start":0,"docs":[]
>> 
>> 
>> The partial match fails on dismax and normal query.
>> 
>> What could I be missing?
>> 
>> 
>> Thanks.
>> 
>> Mugoma.
>> 
>> 
>> 
>> 
> 
> 



Re: String field does not yield partial match result using qf parameter

2013-06-24 Thread Mugoma Joseph O.

It looks like partial search works only with copied to field. This works:

$ curl
"http://localhost:8282/solr/links/select?q=text_ngrams:yengas&wt=json&indent=on&fl=id,domain,score";

On Tue, June 25, 2013 12:39 am, Mugoma Joseph O. wrote:
> Hello,
>
> I am newbie to solr.
>
> I am trying out partial search (match). My experience is opposite of
> http://lucene.472066.n3.nabble.com/string-field-does-not-yield-exact-match-result-using-qf-parameter-td4060096.html
>
> When I add 'qf' to to dismax query I get no result unless there's a full
> match.
>
> I am using NGramFilterFactory as follows:
>
>  
>
>  
>   maxGramSize="15"/>
>
>
>  
>
>  
>
>  ...
>
>
>   stored="false" multiValued="true" />
>
>  ...
>
>  
>
>  ...
>
>  
>
>
> If I have yengas.com in indexed I can search for yengas.com but not
> yengas. However, If I drop 'qf' I can search for yengas.
>
>
> Example searches:
>
>  $ curl
> "http://localhost:8282/solr/links/select?q=domain:yengas&wt=json&indent=on&fl=id,domain,score";
>  => "response":{"numFound":0,"start":0,"docs":[]
>
>
>  $ curl
> "http://localhost:8282/solr/links/select?q=domain:yengas.com&wt=json&indent=on&fl=id,domain,score";
>  => "response":{"numFound":3,"start":0,"docs":[]
>
>  $ curl
> "http://localhost:8282/solr/links/select?defType=dismax&q=yengas&qf=domain^4&pf=domain&ps=0&fl=id,domain,score";
>  => "response":{"numFound":0,"start":0,"docs":[]
>
>
>  $ curl
> "http://localhost:8282/solr/links/select?defType=dismax&q=yengas.com&pf=domain&ps=0&fl=id,domain,score";
>  => "response":{"numFound":3,"start":0,"docs":[]
>
>
> The partial match fails on dismax and normal query.
>
> What could I be missing?
>
>
> Thanks.
>
> Mugoma.
>
>
>
>




String field does not yield partial match result using qf parameter

2013-06-24 Thread Mugoma Joseph O.
Hello,

I am newbie to solr.

I am trying out partial search (match). My experience is opposite of
http://lucene.472066.n3.nabble.com/string-field-does-not-yield-exact-match-result-using-qf-parameter-td4060096.html

When I add 'qf' to to dismax query I get no result unless there's a full
match.

I am using NGramFilterFactory as follows:

 
   
 
 
   
   
 
   
 

 ...


 

 ...

 

 ...

 


If I have yengas.com in indexed I can search for yengas.com but not
yengas. However, If I drop 'qf' I can search for yengas.


Example searches:

 $ curl
"http://localhost:8282/solr/links/select?q=domain:yengas&wt=json&indent=on&fl=id,domain,score";
 => "response":{"numFound":0,"start":0,"docs":[]


 $ curl
"http://localhost:8282/solr/links/select?q=domain:yengas.com&wt=json&indent=on&fl=id,domain,score";
 => "response":{"numFound":3,"start":0,"docs":[]

 $ curl
"http://localhost:8282/solr/links/select?defType=dismax&q=yengas&qf=domain^4&pf=domain&ps=0&fl=id,domain,score";
 => "response":{"numFound":0,"start":0,"docs":[]


 $ curl
"http://localhost:8282/solr/links/select?defType=dismax&q=yengas.com&pf=domain&ps=0&fl=id,domain,score";
 => "response":{"numFound":3,"start":0,"docs":[]


The partial match fails on dismax and normal query.

What could I be missing?


Thanks.

Mugoma.