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:
>
>      <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: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.
>
>
>
>


Reply via email to