Re: String field does not yield partial match result using qf parameter
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. mug...@yengas.com: It looks like partial search works only with copied to field. This works: $ curl http://localhost:8282/solr/links/select?q=text_ngrams:yengaswt=jsonindent=onfl=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: fieldType name=text_edgengrams class=solr.TextField analyzer type=index tokenizer class=solr.LowerCaseTokenizerFactory/ filter class=solr.NGramFilterFactory minGramSize=3 maxGramSize=15/ /analyzer analyzer type=query tokenizer class=solr.LowerCaseTokenizerFactory/ /analyzer /fieldType ... field name=text_ngrams type=text_edgengrams indexed=true stored=false multiValued=true / ... field name=domain type=string indexed=true stored=true/ ... copyField source=domain dest=text_ngrams/ 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:yengaswt=jsonindent=onfl=id,domain,score; = response:{numFound:0,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?q=domain:yengas.comwt=jsonindent=onfl=id,domain,score; = response:{numFound:3,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?defType=dismaxq=yengasqf=domain^4pf=domainps=0fl=id,domain,score; = response:{numFound:0,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?defType=dismaxq=yengas.compf=domainps=0fl=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
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: fieldType name=text_edgengrams class=solr.TextField analyzer type=index tokenizer class=solr.LowerCaseTokenizerFactory/ filter class=solr.NGramFilterFactory minGramSize=3 maxGramSize=15/ /analyzer analyzer type=query tokenizer class=solr.LowerCaseTokenizerFactory/ /analyzer /fieldType ... field name=text_ngrams type=text_edgengrams indexed=true stored=false multiValued=true / ... field name=domain type=string indexed=true stored=true/ ... copyField source=domain dest=text_ngrams/ 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:yengaswt=jsonindent=onfl=id,domain,score; = response:{numFound:0,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?q=domain:yengas.comwt=jsonindent=onfl=id,domain,score; = response:{numFound:3,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?defType=dismaxq=yengasqf=domain^4pf=domainps=0fl=id,domain,score; = response:{numFound:0,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?defType=dismaxq=yengas.compf=domainps=0fl=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
It looks like partial search works only with copied to field. This works: $ curl http://localhost:8282/solr/links/select?q=text_ngrams:yengaswt=jsonindent=onfl=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: fieldType name=text_edgengrams class=solr.TextField analyzer type=index tokenizer class=solr.LowerCaseTokenizerFactory/ filter class=solr.NGramFilterFactory minGramSize=3 maxGramSize=15/ /analyzer analyzer type=query tokenizer class=solr.LowerCaseTokenizerFactory/ /analyzer /fieldType ... field name=text_ngrams type=text_edgengrams indexed=true stored=false multiValued=true / ... field name=domain type=string indexed=true stored=true/ ... copyField source=domain dest=text_ngrams/ 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:yengaswt=jsonindent=onfl=id,domain,score; = response:{numFound:0,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?q=domain:yengas.comwt=jsonindent=onfl=id,domain,score; = response:{numFound:3,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?defType=dismaxq=yengasqf=domain^4pf=domainps=0fl=id,domain,score; = response:{numFound:0,start:0,docs:[] $ curl http://localhost:8282/solr/links/select?defType=dismaxq=yengas.compf=domainps=0fl=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.