You can do this by specifying slop for your fields.
If you want to see how exactly your query is being treated you should use
the analysis tool that is available in the solr admin ui under your
collection name.

On Mon, 28 Dec 2015, 12:24 Jason <hialo...@gmail.com> wrote:

> Hi, all
> I'm wondering how multi generated queries are scoring.
>
> My schema setting is
>
> <fieldType name="test" class="solr.TextField" omitNorms="false"
> positionIncrementGap="100">
>   <analyzer type="query">
>      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>      <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="lang/stopwords_en.txt" enablePositionIncrements="true" />
>      <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
> generateNumberParts="1" catenateWords="0" catenateNumbers="0"
> catenateAll="0" splitOnCaseChange="1"/>
>      <filter class="solr.LowerCaseFilterFactory" />
>   </analyzer>
> </fiedldType>
>
>
> If I query test:chloro-4-hydroxy with default opearator AND,
> result is below
>
> <lst name="responseHeader">
>   <int name="status">0</int>
>   <int name="QTime">300</int>
>   <lst name="params">
>     <str name="debugQuery">true</str>
>     <str name="fl">*,score</str>
>     <str name="indent">true</str>
>     <str name="q">test:chloro-4-hydroxy</str>
>     <str name="q.op">AND</str>
>     <str name="wt">xml</str>
>   </lst>
> </lst>
> <result name="response" numFound="2" start="0" maxScore="1.8082676">
>   <doc>
>     <str name="id">test1</str>
>     <str name="test">chloro-4-hydroxy meaningless word</str>
>     <float name="score">1.8082676</float></doc>
>   <doc>
>     <str name="id">test2</str>
>     <str name="test">chloro 4 meaningless word hydroxy</str>
>     <float name="score">1.8082676</float></doc>
> </result>
>
>
> Socre of two document is same.
> If possible, I want to more score at doc id 'test1'.
> 'chloro', '4', 'hydroxy' are close each other in 'test1'.
> But 'hydroxy' is far from 'chloro' and '4' in 'test2'.
> I think 'test1' is more proper than 'test2'.
> Is there a way to give more score according to distance among the query
> terms?
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/how-s-multi-query-scoring-tp4247512.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
-- 
Regards,
Binoy Dalal

Reply via email to