You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by nativecoder <ro...@gmail.com> on 2014/05/04 22:02:31 UTC

How Solr will execute a query mentioned below

How will a query like below will get executed, In which order 

I understand that when this query is executed fields mentioned in fieldList
will be returned. What I don't understand is how the "samplestring1" and
"samplestring2" will get searched with the query fields specified

I think I will be able to understand how the search happens if this can be
illustrated in SQL ( Just to understand what happens behind the scene) 

Following is the query. Please have a look at it and let me know how this
works internally.
query=samplestring1 AND samplestring2 
defType: edismax 
queryFields: Exact_Field1^1.0 Exact_Field2^0.9 Field2^0.8 Field3^0.7 
fieldList: Column1, Column2 
resultRows: 10
startRow: 0

P.S testuser.lastname@hotmail.com AND testuser.lastname  are some test
strings in the query

Sample of Schema for fields

<fieldType name="sampletype1" class="solr.TextField"
positionIncrementGap="100"><analyzer type="index"><tokenizer
class="solr.KeywordTokenizerFactory"/><filter
class="solr.LowerCaseFilterFactory"/><filter class="solr.NGramFilterFactory"
minGramSize="5" maxGramSize="10"/></analyzer><analyzer
type="query"><tokenizer class="solr.KeywordTokenizerFactory"/><filter
class="solr.LowerCaseFilterFactory"/></analyzer></fieldType>

<fieldtype name="sampletype2" class="solr.TextField" sortMissingLast="true"
omitNorms="true"><analyzer><tokenizer
class="solr.KeywordTokenizerFactory"/><filter
class="solr.LowerCaseFilterFactory"/></analyzer></fieldtype>

<field name="Field1" compressed="true" type="sampletype1"
multiValued="false" indexed="true" stored="true" required="true"
omitNorms="true"/>

<field name="Field2" compressed="true" type="sampletype1"
multiValued="false" indexed="true" stored="true" required="true"
omitNorms="true"/>

<field name="Exact_Field1" omitPositions="true" termVectors="false"
omitTermFreqAndPositions="true" compressed="true" type="sampletype2"
multiValued="false" indexed="true" stored="true" required="true"
omitNorms="true"/>

<field name="Exact_Field2" omitPositions="true" termVectors="false"
omitTermFreqAndPositions="true" compressed="true" type="sampletype2"
multiValued="false" indexed="true" stored="true" required="false"
omitNorms="true"/>






--
View this message in context: http://lucene.472066.n3.nabble.com/How-Solr-will-execute-a-query-mentioned-below-tp4134561.html
Sent from the Solr - User mailing list archive at Nabble.com.