I am using edismax parser with the following query:

localhost:8983/solr/tgl/select?q=eating%20disorders&wt=xml&tie=1.0&rows=200&q.op=AND&indent=true&defType=edismax&stopwords=true&lowercaseOperators=true&debugQuery=true&qf=topic_title%5E100+subtopic_title%5E40+index_term%5E20+drug%5E15+content%5E3&pf2=topTitle%5E200+subTopTitle%5E80+indTerm%5E40+drugString%5E30+content%5E6

Configuration of schema.xml

<field name="topic_title" type="text_general" indexed="true" stored="true"
/>
<field name="topTitle" type="string" indexed="true" stored="false"/>

<field name="subtopic_title" type="text_general" indexed="true"
stored="true"/>
<field name="subTopTitle" type="string" indexed="true" stored="false"/>

<field name="index_term" type="text_ws" indexed="true" stored="true"
multiValued="true"/>
<field name="indTerm" type="string" indexed="true" stored="false"
multiValued="true"/>

<field name="drug" type="text_ws" indexed="true" stored="true"
multiValued="true"/>
<field name="drugString" type="string" indexed="true" stored="false"
multiValued="true"/>

<field name="content" type="text_general" indexed="true" stored="true"/>

<copyField source="topic_title" dest="topTitle"/>
<copyField source="subtopic_title" dest="subTopTitle"/>
<copyField source="index_term" dest="indTerm"/>
<copyField source="drug" dest="drugString"/>

<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100" omitNorms="true">
        <analyzer type="index">
                        <tokenizer class="solr.StandardTokenizerFactory"/>
                        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
                        <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
        <analyzer type="query">
                        <tokenizer class="solr.StandardTokenizerFactory"/>
                        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
                        <filter class="solr.SynonymFilterFactory" 
synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
                        <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
</fieldType>
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100"
omitTermFreqAndPositions="true" omitNorms="true">
        <analyzer>
                        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
                        <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
</fieldType>


I want , if user will search for a phrase then that pharse should always
takes the priority in comaprison to the individual words;

Example: "Eating Disorders"

First it will search for "Eating Disorders" together and then the individual
words "Eating" and "Disorders"
but while searching for individual words, it will always return those
documents where both the words should exist for which i am already using
q.op="AND" in my query.

Thanks,
Nitin 




--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257510.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to