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: unable to facet range query
Date Thu, 12 Dec 2013 08:14:15 GMT
Hi,

If you don't use QEC, just remove it from configuration file. If you need it change queryFieldType
from integer to text_sw or something like that.

http://wiki.apache.org/solr/QueryElevationComponent#queryFieldType


The word 'promotions' is not a numeric value, thats why you are getting the exception.



On Thursday, December 12, 2013 8:43 AM, Nutan <nutanshinde1992@gmail.com> wrote:
My schema has :
<field name="contents" type="text" indexed="true" stored="true"
multiValued="false"/>
<field name="id" type="integer" indexed="true" stored="true" required="true"
multiValued="false"/>

this is my field which i want to facet:
<field name="id" type="integer" indexed="true" stored="true" required="true"
multiValued="false"/>
<fieldType name="integer" class="solr.IntField"  omitNorms="true"
positionIncrementGap="0"/>

I replaced above fieldtype with this:
<fieldType name="integer" class="solr.TrieIntField" precisionStep="0"
positionIncrementGap="0"/>

But now this shows error in elevate component.My elevate.xml is
<?xml version="1.0" encoding="UTF-8" ?>
<elevate>
<query text="promotions">
<doc id="2" />
<doc id="7" />
</query>
</elevate>

<searchComponent name="elevator" class="solr.QueryElevationComponent" >
<str name="queryFieldType">integer</str>
<str name="config-file">elevate.xml</str>
</searchComponent>

*Logs:*
Caused by: org.apache.solr.common.SolrException: Error initializing
QueryElevationComponent.
    at
org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:218)
    at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:592)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:801)
    ... 13 more
Caused by: org.apache.solr.common.SolrException: Invalid Number: promotions
    at
org.apache.solr.analysis.TrieTokenizer.reset(TrieTokenizerFactory.java:122)

i read that range queries are for numeric fields,isn't IntField a numeric
one?
What are the other datatypes that support range queries?



--
View this message in context: http://lucene.472066.n3.nabble.com/unable-to-facet-range-query-tp4106305.html
Sent from the Solr - User mailing list archive at Nabble.com.


Mime
View raw message