You should use mm parameter and it should be set to 100 if you use dismax
or edismax


On Tue, Oct 23, 2018 at 11:18 AM Gauri Dhawan <ga...@sheroes.in.invalid>
wrote:

> Hi!
> I have been facing an issue for quite some time and haven't been able to
> come to a solution as of yet. We are trying to implement search on our
> platform and all our data is stored in Solr.
>
> I have a field `description` which is the field where I have to search.
> It is of the field type `text_edit_suggest` and it looks something like
> this
>
> <fieldType name="text_suggest_edge" class="solr.TextField">
> >       <analyzer type="index">
> >         <!--charFilter class="solr.MappingCharFilterFactory"
> > mapping="mapping-ISOLatin1Accent.txt"/-->
> >         <tokenizer class="solr.KeywordTokenizerFactory"/>
> >         <filter class="solr.LowerCaseFilterFactory"/>
> >         <filter class="solr.PatternReplaceFilterFactory"
> > pattern="([\.,;:-_])" replacement=" " replace="all"/>
> >         <filter class="solr.EdgeNGramFilterFactory" maxGramSize="30"
> > minGramSize="1"/>
> >         <filter class="solr.PatternReplaceFilterFactory"
> > pattern="([^\w\d\*æøåÆØÅ ])" replacement="" replace="all"/>
> >         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> > ignoreCase="true" expand="false"/>
> >           <tokenizer class="solr.StandardTokenizerFactory "/>
> >           <filter class="solr.PorterStemFilterFactory"/>
> >       </analyzer>
> >       <analyzer type="query">
> >         <!--charFilter class="solr.MappingCharFilterFactory"
> > mapping="mapping-ISOLatin1Accent.txt"/-->
> >         <tokenizer class="solr.KeywordTokenizerFactory"/>
> >         <filter class="solr.LowerCaseFilterFactory"/>
> >         <filter class="solr.PatternReplaceFilterFactory"
> > pattern="([\.,;:-_])" replacement=" " replace="all"/>
> >         <filter class="solr.PatternReplaceFilterFactory"
> > pattern="([^\w\d\*æøåÆØÅ ])" replacement="" replace="all"/>
> >         <filter class="solr.PatternReplaceFilterFactory"
> > pattern="^(.{30})(.*)?" replacement="$1" replace="all"/>
> >         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> > ignoreCase="true" expand="false"/>
> >       </analyzer>
>
>
>
> When I search for multiple keywords, the results are unexpected.
> For example :
> I want to search for the words `first` and `post` and both these words
> should be present in the description field of the document else it
> shouldn't return the document.
> I've tried some 50+ queries for this. Used `edismax` parser as well but in
> vain.
>
> Tried boosting as well. But most queries result in weight given to either
> one of the keywords and results in documents that have that keyword but not
> the other. Can you guys help? Thanks in advance!
>
>
> Gauri Dhawan
> Associate Software Engineer
> SHEROES
>

Reply via email to