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 anuragwalia <an...@gmail.com> on 2014/04/04 15:15:05 UTC
Solr Search on Fields name
Hi,
Thank for giving your important time.
Problem :
I am unable to find a way how can I search Key with "OR" operator like if I
search Items having "RuleA" OR "RuleE".
Format of Indexed Data:
<result name="response" numFound="27" start="0" maxScore="1.0">
<doc>
<float name="score">1.0</float>
.....
<int name="RuleA">4</int>
<int name="RuleD">2</int>
<int name="RuleE">2</int>
<int name="RuleF">2</int>
....
</doc>
Can any one help me out how can prepare SearchQuery for key search.
Regards
Anurag
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-on-Fields-name-tp4129119.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Search on Fields name
Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Anurag,
It seems that RuleA and RuleB are field names?
in that case try this query
q=RuleA:[* TO *] OR RuleB:[* TO *]
Ahmet
On Friday, April 4, 2014 4:15 PM, anuragwalia <an...@gmail.com> wrote:
Hi,
Thank for giving your important time.
Problem :
I am unable to find a way how can I search Key with "OR" operator like if I
search Items having "RuleA" OR "RuleE".
Format of Indexed Data:
<result name="response" numFound="27" start="0" maxScore="1.0">
<doc>
<float name="score">1.0</float>
.....
<int name="RuleA">4</int>
<int name="RuleD">2</int>
<int name="RuleE">2</int>
<int name="RuleF">2</int>
....
</doc>
Can any one help me out how can prepare SearchQuery for key search.
Regards
Anurag
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-on-Fields-name-tp4129119.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Search on Fields name
Posted by Jack Krupansky <ja...@basetechnology.com>.
One technique is to add a copyField directive to your schema, which can use
a wildcard to copy a bunch of fields to a single, combinaed field that you
can query directly, such as rullAll:key.
Or, consider using a multivalued field.
-- Jack Krupansky
-----Original Message-----
From: anuragwalia
Sent: Friday, April 4, 2014 7:15 AM
To: solr-user@lucene.apache.org
Subject: Solr Search on Fields name
Hi,
Thank for giving your important time.
Problem :
I am unable to find a way how can I search Key with "OR" operator like if I
search Items having "RuleA" OR "RuleE".
Format of Indexed Data:
<result name="response" numFound="27" start="0" maxScore="1.0">
<doc>
<float name="score">1.0</float>
.....
<int name="RuleA">4</int>
<int name="RuleD">2</int>
<int name="RuleE">2</int>
<int name="RuleF">2</int>
....
</doc>
Can any one help me out how can prepare SearchQuery for key search.
Regards
Anurag
--
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-Search-on-Fields-name-tp4129119.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Search on Fields name
Posted by anuragwalia <an...@gmail.com>.
Thanks Ahmat and Jack for replying.
I found a another way to solve the problem by using FilterQuery.
fq=RuleA:*+OR+RuleC:*
but due to development platform query parsing stuck some where else.
Hopefully after platform fix it will work for me.
I will get back to you if any other issue occurred.
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-on-Fields-name-tp4129119p4129648.html
Sent from the Solr - User mailing list archive at Nabble.com.