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 "Nguyen, Joe" <jn...@automotive.com> on 2008/10/29 03:00:23 UTC
Query integer type
SITE is defined as integer. I wanted to select all document whose SITE=3002, but SITE of the response was different.
<field name="SITE" type="integer" indexed="true" stored="true" required="true"/>
http://localhost:8080/solr/mysite/select?indent=on&qt=standard&fl=SITE&fq:SITE:3002
http://localhost:8080/solr/mysite/select?indent=on&qt=dismax&fl=SITE&fq:SITE:3002
http://localhost:8080/solr/mysite/select?indent=on&qt=standard&fl=SITE&SITE:3002
<result name="response" numFound="470" start="0">
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">2</int>
....
Field Analysis
Index Analyzer
org.apache.solr.schema.FieldType$DefaultAnalyzer {}
term position 1
term text 3002
term type word
source start,end 0,4
payload
Query Analyzer
org.apache.solr.schema.FieldType$DefaultAnalyzer {}
term position 1
term text 3002
term type word
source start,end 0,4
payload
Should term type be integer?
Any suggestion?
Cheers
RE: Query integer type
Posted by "Nguyen, Joe" <jn...@automotive.com>.
Never mind. I misused the syntax. :-)
-----Original Message-----
From: Nguyen, Joe [mailto:jnguyen@automotive.com]
Sent: Tuesday, October 28, 2008 7:00 Joe
To: solr-user@lucene.apache.org
Subject: Query integer type
SITE is defined as integer. I wanted to select all document whose SITE=3002, but SITE of the response was different.
<field name="SITE" type="integer" indexed="true" stored="true" required="true"/>
http://localhost:8080/solr/mysite/select?indent=on&qt=standard&fl=SITE&fq:SITE:3002
http://localhost:8080/solr/mysite/select?indent=on&qt=dismax&fl=SITE&fq:SITE:3002
http://localhost:8080/solr/mysite/select?indent=on&qt=standard&fl=SITE&SITE:3002
<result name="response" numFound="470" start="0">
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">1</int>
</doc>
−
<doc>
<int name="SITE">2</int>
....
Field Analysis
Index Analyzer
org.apache.solr.schema.FieldType$DefaultAnalyzer {}
term position 1
term text 3002
term type word
source start,end 0,4
payload
Query Analyzer
org.apache.solr.schema.FieldType$DefaultAnalyzer {}
term position 1
term text 3002
term type word
source start,end 0,4
payload
Should term type be integer?
Any suggestion?
Cheers