lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: query problem
Date Wed, 05 Mar 2014 20:53:58 GMT
Hi Kishan,

can you please give us example document query pair that query should retrieve that document.

e.g. query q=State:"tamil nadu" should return what document text?

Ahmet



On Wednesday, March 5, 2014 9:04 PM, Kishan Parmar <kishan.jsk@gmail.com> wrote:
Thanks ,
but
still no change in output  ---> q=State:"tamil nadu" it parse as

"q": "State:\"tamil nadu\""


Regards,

Kishan Parmar
Software Developer
+91 95 100 77394
Jay Shree Krishnaa !!




2014-03-06 0:17 GMT+05:30 Ahmet Arslan <iorixxx@yahoo.com>:

> Hi,
>
> I suspect q=State:tamil nadu parsed as State:tamil text:nadu. You can
> confirm this by adding debugQuery=on.
>
> Either use quotes q=State:"tamil nadu"
> or use term query parser q={!term f=State}tamil nadu
>
> Ahmet
>
>
>
> On Wednesday, March 5, 2014 8:29 PM, Kishan Parmar <kishan.jsk@gmail.com>
> wrote:
> hi there
> my schema file is this--------------------------->
> <?xml version="1.0" encoding="UTF-8" ?>
>   <schema name="example" version="1.2">
>   <types>
>       <fieldType name="string" class="solr.StrField" sortMissingLast="true"
> omitNorms="true" />
>       <fieldType name="int" class="solr.TrieIntField" precisionStep="0"
> omitNorms="true" positionIncrementGap="0" />
>       <fieldType name="date" class="solr.TrieDateField" omitNorms="true"
> precisionStep="0" positionIncrementGap="0" />
>       <fieldType name="text" class="solr.TextField"
> positionIncrementGap="100">
>           <analyzer type="index">
>               <tokenizer class="solr.WhitespaceTokenizerFactory" />
>               <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true" />
>               <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="2" generateNumberParts="2" catenateWords="2"
> catenateNumbers="2" catenateAll="1" splitOnCaseChange="2" />
>               <filter class="solr.LowerCaseFilterFactory" />
>               <filter class="solr.SnowballPorterFilterFactory"
> language="English" protected="protwords.txt" />
>           </analyzer>
>         <analyzer type="query">
>           <tokenizer class="solr.WhitespaceTokenizerFactory" />
>           <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true" />
>           <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true" />
>           <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="2" generateNumberParts="2" catenateWords="1"
> catenateNumbers="1" catenateAll="1" splitOnCaseChange="2" />
>           <filter class="solr.LowerCaseFilterFactory" />
>           <filter class="solr.SnowballPorterFilterFactory"
> language="English" protected="protwords.txt" />
>         </analyzer>
>       </fieldType>
> </types>
>   <fields>
>       <field name="SrNo" type="int" indexed="true" stored="true"
> required="true" />
>       <field name="Name" type="string" indexed="true" stored="true"
> required="true" />
>       <field name="Scheme" type="string" indexed="true" stored="true"
> required="true" />
>       <field name="State" type="string" indexed="true" stored="true"
> required="true" />
>       <field name="text" type="text" indexed="true" stored="true"
> multiValued="true" />
>       <field name="_version_" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>   </fields>
>
>       <copyField source="SrNo" dest="text" />
>       <copyField source="Name" dest="text" />
>       <copyField source="Scheme" dest="text" />
>       <copyField source="State" dest="text" />
>
>       <uniqueKey>SrNo</uniqueKey>
>       <defaultSearchField>text</defaultSearchField>
>       <solrQueryParser defaultOperator="AND" />
>   </schema>
> ---------------->
> and when i try to query in solr 4.6.0 which is "State:tamil nadu" it gives
> 0 result but is there any problem with whitesapce in type="String"
>
> Regards,
>
> Kishan Parmar
> Software Developer
> +91 95 100 77394
> Jay Shree Krishnaa !!
>
>


Mime
View raw message