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 JavaGuy84 <bb...@gmail.com> on 2010/03/08 20:17:56 UTC
Search on dynamic fields which contains spaces /special characters
Hi,
We have some dynamic fields getting indexed using SOLR. Some of the dynamic
fields contains spaces / special character (something like: short name, Full
Name etc...). Is there a way to search on these fields (which contains the
spaces etc..). Can someone let me know the filter I need to pass to do this
type of search?
I tried with short name:name1 --> this didnt work..
Thanks,
Barani
--
View this message in context: http://old.nabble.com/Search-on-dynamic-fields-which-contains-spaces--special-characters-tp27826147p27826147.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Search on dynamic fields which contains spaces /special characters
Posted by Chris Hostetter <ho...@fucit.org>.
: I do not believe the SOLR or LUCENE syntax allows this
At the lowest level, Solr and Lucene-Java both support any arbitrary
character you want in the field name -- it's just that sevearl features
use syntax that doesn't play nicely with characters like whitespace in
field names.
when using the Lucene query parser, you can backslash escape a whitespace
character, even in a field name...
http://localhost:8983/solr/select/?debugQuery=true&explainOther=SOLR&q=foo\+bar_t%3Asolr
...however params like "fl" and "sort" don't support this type of
escaping, so you're really better off trying to use field names that don't
contain whitespace (or ",", or "|", or "}" any of the other meta
characters that are used by varoius features when looking at field names
in request paramaters)
-Hoss
Re: Search on dynamic fields which contains spaces /special
characters
Posted by Erick Erickson <er...@gmail.com>.
Please repost as a separate thread..
From:
http://people.apache.org/~hossman/#threadhijack
When starting a new discussion on a mailing list, please do not reply to
an existing message, instead start a fresh email. Even if you change the
subject line of your email, other mail headers still track which thread
you replied to and your question is "hidden" in that thread and gets less
attention. It makes following discussions in the mailing list archives
particularly difficult.
See Also: http://en.wikipedia.org/wiki/User:DonDiego/Thread_hijacking
On Mon, Mar 8, 2010 at 11:09 PM, Dennis Gearon <ge...@sbcglobal.net>wrote:
> I'm starting to learn Soir/Lucene. I'm working on a shared server and have
> to use a stand alone Java install. Anyone tell me how to install OpenJDK for
> a shared server account?
>
>
> Dennis Gearon
>
> Signature Warning
> ----------------
> EARTH has a Right To Life,
> otherwise we all die.
>
> Read 'Hot, Flat, and Crowded'
> Laugh at http://www.yert.com/film.php
>
>
> --- On Mon, 3/8/10, Israel Ekpo <is...@gmail.com> wrote:
>
> > From: Israel Ekpo <is...@gmail.com>
> > Subject: Re: Search on dynamic fields which contains spaces /special
> characters
> > To: solr-user@lucene.apache.org
> > Date: Monday, March 8, 2010, 12:44 PM
> > I do not believe the SOLR or LUCENE
> > syntax allows this
> >
> > You need to get rid of all the spaces in the field name
> >
> > If not, then you will be searching for "short" in the
> > default field and then
> > "name1" in the "name" field.
> >
> > http://wiki.apache.org/solr/SolrQuerySyntax
> >
> > http://lucene.apache.org/java/2_9_2/queryparsersyntax.html
> >
> >
> > On Mon, Mar 8, 2010 at 2:17 PM, JavaGuy84 <bb...@gmail.com>
> > wrote:
> >
> > >
> > > Hi,
> > >
> > > We have some dynamic fields getting indexed using
> > SOLR. Some of the dynamic
> > > fields contains spaces / special character (something
> > like: short name,
> > > Full
> > > Name etc...). Is there a way to search on these fields
> > (which contains the
> > > spaces etc..). Can someone let me know the filter I
> > need to pass to do this
> > > type of search?
> > >
> > > I tried with short name:name1 --> this didnt
> > work..
> > >
> > > Thanks,
> > > Barani
> > > --
> > > View this message in context:
> > >
> http://old.nabble.com/Search-on-dynamic-fields-which-contains-spaces--special-characters-tp27826147p27826147.html
> > > Sent from the Solr - User mailing list archive at
> > Nabble.com.
> > >
> > >
> >
> >
> > --
> > "Good Enough" is not good enough.
> > To give anything less than your best is to sacrifice the
> > gift.
> > Quality First. Measure Twice. Cut Once.
> > http://www.israelekpo.com/
> >
>
Re: Search on dynamic fields which contains spaces /special characters
Posted by Dennis Gearon <ge...@sbcglobal.net>.
I'm starting to learn Soir/Lucene. I'm working on a shared server and have to use a stand alone Java install. Anyone tell me how to install OpenJDK for a shared server account?
Dennis Gearon
Signature Warning
----------------
EARTH has a Right To Life,
otherwise we all die.
Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php
--- On Mon, 3/8/10, Israel Ekpo <is...@gmail.com> wrote:
> From: Israel Ekpo <is...@gmail.com>
> Subject: Re: Search on dynamic fields which contains spaces /special characters
> To: solr-user@lucene.apache.org
> Date: Monday, March 8, 2010, 12:44 PM
> I do not believe the SOLR or LUCENE
> syntax allows this
>
> You need to get rid of all the spaces in the field name
>
> If not, then you will be searching for "short" in the
> default field and then
> "name1" in the "name" field.
>
> http://wiki.apache.org/solr/SolrQuerySyntax
>
> http://lucene.apache.org/java/2_9_2/queryparsersyntax.html
>
>
> On Mon, Mar 8, 2010 at 2:17 PM, JavaGuy84 <bb...@gmail.com>
> wrote:
>
> >
> > Hi,
> >
> > We have some dynamic fields getting indexed using
> SOLR. Some of the dynamic
> > fields contains spaces / special character (something
> like: short name,
> > Full
> > Name etc...). Is there a way to search on these fields
> (which contains the
> > spaces etc..). Can someone let me know the filter I
> need to pass to do this
> > type of search?
> >
> > I tried with short name:name1 --> this didnt
> work..
> >
> > Thanks,
> > Barani
> > --
> > View this message in context:
> > http://old.nabble.com/Search-on-dynamic-fields-which-contains-spaces--special-characters-tp27826147p27826147.html
> > Sent from the Solr - User mailing list archive at
> Nabble.com.
> >
> >
>
>
> --
> "Good Enough" is not good enough.
> To give anything less than your best is to sacrifice the
> gift.
> Quality First. Measure Twice. Cut Once.
> http://www.israelekpo.com/
>
Re: Search on dynamic fields which contains spaces /special
characters
Posted by Israel Ekpo <is...@gmail.com>.
I do not believe the SOLR or LUCENE syntax allows this
You need to get rid of all the spaces in the field name
If not, then you will be searching for "short" in the default field and then
"name1" in the "name" field.
http://wiki.apache.org/solr/SolrQuerySyntax
http://lucene.apache.org/java/2_9_2/queryparsersyntax.html
On Mon, Mar 8, 2010 at 2:17 PM, JavaGuy84 <bb...@gmail.com> wrote:
>
> Hi,
>
> We have some dynamic fields getting indexed using SOLR. Some of the dynamic
> fields contains spaces / special character (something like: short name,
> Full
> Name etc...). Is there a way to search on these fields (which contains the
> spaces etc..). Can someone let me know the filter I need to pass to do this
> type of search?
>
> I tried with short name:name1 --> this didnt work..
>
> Thanks,
> Barani
> --
> View this message in context:
> http://old.nabble.com/Search-on-dynamic-fields-which-contains-spaces--special-characters-tp27826147p27826147.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
--
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/