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 J'roo <va...@bluewin.ch> on 2014/09/30 17:08:38 UTC
Search multiple values with wildcards
Hi,
I am using Solr 3.5.0 with JavaClient SolrJ which I cannot change.
I have following type of docs:
<doc>
<str
name="proprietaryMessage_tis">:20:13-900-C05-P001:21:REF12349:25:23456789:32A:130202USD100,00:52A:/123456</str>
</doc>
I want to be able to find docs containing :25:234* AND :32A:1302* using
wildcards, which I thought to do like:
&q=proprietaryMessage_tis:(\:25\:23456*+\:32A\:130202US*)
But this doesn't work. Have tried many variations, anyone got a good tip for
me?
Thanks!
--
View this message in context: http://lucene.472066.n3.nabble.com/Search-multiple-values-with-wildcards-tp4161916.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Search multiple values with wildcards
Posted by Jack Krupansky <ja...@basetechnology.com>.
The special characters (colon) are treated as term delimiters for text
field. How do you really intend to query this "string". You could make it
simply a "string" field.
-- Jack Krupansky
-----Original Message-----
From: J'roo
Sent: Tuesday, September 30, 2014 11:08 AM
To: solr-user@lucene.apache.org
Subject: Search multiple values with wildcards
Hi,
I am using Solr 3.5.0 with JavaClient SolrJ which I cannot change.
I have following type of docs:
<doc>
<str
name="proprietaryMessage_tis">:20:13-900-C05-P001:21:REF12349:25:23456789:32A:130202USD100,00:52A:/123456</str>
</doc>
I want to be able to find docs containing :25:234* AND :32A:1302* using
wildcards, which I thought to do like:
&q=proprietaryMessage_tis:(\:25\:23456*+\:32A\:130202US*)
But this doesn't work. Have tried many variations, anyone got a good tip for
me?
Thanks!
--
View this message in context:
http://lucene.472066.n3.nabble.com/Search-multiple-values-with-wildcards-tp4161916.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Search multiple values with wildcards
Posted by J'roo <va...@bluewin.ch>.
Hi Jack, Ahmet,
Thanks for your tips!
In the end I found this the best way to do it:
q=proprietaryMessage_tis:(25++23456*++32A++130202US*)
All the best
--
View this message in context: http://lucene.472066.n3.nabble.com/Search-multiple-values-with-wildcards-tp4161916p4163263.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Search multiple values with wildcards
Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi,
İf you want to avoid escaping madness, try prefix query parser.
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-PrefixQueryParser
q={!prefix f=proprietaryMessage_tis}:25:234&fq={!prefix f=proprietaryMessage_tis}:32A:1302
Ahmet
On Tuesday, September 30, 2014 6:08 PM, J'roo <va...@bluewin.ch> wrote:
Hi,
I am using Solr 3.5.0 with JavaClient SolrJ which I cannot change.
I have following type of docs:
<doc>
<str
name="proprietaryMessage_tis">:20:13-900-C05-P001:21:REF12349:25:23456789:32A:130202USD100,00:52A:/123456</str>
</doc>
I want to be able to find docs containing :25:234* AND :32A:1302* using
wildcards, which I thought to do like:
&q=proprietaryMessage_tis:(\:25\:23456*+\:32A\:130202US*)
But this doesn't work. Have tried many variations, anyone got a good tip for
me?
Thanks!
--
View this message in context: http://lucene.472066.n3.nabble.com/Search-multiple-values-with-wildcards-tp4161916.html
Sent from the Solr - User mailing list archive at Nabble.com.