Re: Search on dynamic fields which contains spaces /special characters
: 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
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 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 wrote: > > > From: Israel Ekpo > > 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 > > 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
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 wrote: > From: Israel Ekpo > 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 > 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
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 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/
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: Faceted Search on Dynamic Fields?
On Fri, Sep 25, 2009 at 12:19 PM, Avlesh Singh wrote: > Faceting, as of now, can only be done of definitive field names. To further clarify, the fields you can facet on can include those defined by dynamic fields. You just must specify the exact field name when you facet. Did you really mean for the ampersand to be in the dynamic field name? I'd advise against this, and it could be the source of your problems (escaping the ampersand in your request, etc). What is the exact facet request you are sending? -Yonik http://www.lucidimagination.com
Re: Faceted Search on Dynamic Fields?
Faceting, as of now, can only be done of definitive field names. Faceting on field names matching wildcards (dynamic field being one such scenario) is yet to be supported. There are lot of open issues, aiming to achieve this. Find a similar discussion here - http://www.lucidimagination.com/search/document/787cc8cc9ea095e6/item_facet Cheers Avlesh On Fri, Sep 25, 2009 at 7:47 PM, danben wrote: > > Also, here is the field definition in the schema > > indexed="true" stored="true" multiValued="true"/> > > > -- > View this message in context: > http://www.nabble.com/Faceted-Search-on-Dynamic-Fields--tp25612887p25612936.html > Sent from the Solr - User mailing list archive at Nabble.com. > >
Re: Faceted Search on Dynamic Fields?
Also, here is the field definition in the schema -- View this message in context: http://www.nabble.com/Faceted-Search-on-Dynamic-Fields--tp25612887p25612936.html Sent from the Solr - User mailing list archive at Nabble.com.
Faceted Search on Dynamic Fields?
I'm trying to perform a faceted query with the facet field referencing a field that is not in the schema but matches a dynamicField with its suffix. The query returns results but for some reason the facet list is always empty. When I change the facet field to one that is explicitly named in the schema I get the proper results. Is this expected behavior? I wasn't able to find anything in the docs about dynamic fields wrt faceting. One other thing I thought might have been causing the problem is that the values in this field are mostly distinct (that won't be the case in the actual application, I'm just doing it this way now to see how faceted queries behave). However, when I performed the same query with a static field with lots of distinct values I just got an OutOfMemoryError, which leads me back to my original hypothesis. So, is it the case that faceted queries are not permitted on dynamic facet fields, and if so, is there any workaround? -- View this message in context: http://www.nabble.com/Faceted-Search-on-Dynamic-Fields--tp25612887p25612887.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Search on dynamic fields
I'm 100% sure about that :) On Jun 5, 2009, at 9:05 PM, Avlesh Singh wrote: My bad! Please ignore the previous reply. I just read your mail again to realize that there is a problem. Are you sure that the case (upper/lower) in your query and index match? Any difference in cases would not fetch you results for a field of type string. Cheers Avlesh On Sat, Jun 6, 2009 at 12:30 AM, Avlesh Singh wrote: When I search for exact match on "New" I get zero results! q=17000219_s:New But when I search on 1003356 I get results! q=17000219_s: 1003356 And when I use wildcards I get results too! q=17000219_s: *New or q=17000219_s:New* or q=17000219_s:*New* Nothing your case is unexpected, Reza. Your dynamic field is a * multivalued* field which has three values. The document containing this field would be fetched whenever this field is searched for any of the contained values. I think you want to use this field differently. It would be to nice to hear from you, before I make too many assumptions to figure out your problem and suggest a solution. Cheers Avlesh On Fri, Jun 5, 2009 at 8:39 PM, Reza Safari wrote: When I search for exact match on "New" I get zero results! q=17000219_s:New But when I search on 1003356 I get results! q=17000219_s: 1003356 And when I use wildcards I get results too! q=17000219_s: *New or q=17000219_s:New* or q=17000219_s:*New* Can anyone explain this? schema: stored="true" multiValued="true"/> Xml: 1003356 New New -- Reza Safari LUKKIEN Copernicuslaan 15 6716 BM Ede The Netherlands - http://www.lukkien.com t: +31 (0) 318 698000 This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. -- Reza Safari LUKKIEN Copernicuslaan 15 6716 BM Ede The Netherlands - http://www.lukkien.com t: +31 (0) 318 698000 This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
Re: Search on dynamic fields
My bad! Please ignore the previous reply. I just read your mail again to realize that there is a problem. Are you sure that the case (upper/lower) in your query and index match? Any difference in cases would not fetch you results for a field of type string. Cheers Avlesh On Sat, Jun 6, 2009 at 12:30 AM, Avlesh Singh wrote: > When I search for exact match on "New" I get zero results! >> q=17000219_s:New >> But when I search on 1003356 I get results! q=17000219_s: 1003356 >> And when I use wildcards I get results too! q=17000219_s: *New or >> q=17000219_s:New* or q=17000219_s:*New* >> > > Nothing your case is unexpected, Reza. Your dynamic field is a * > multivalued* field which has three values. The document containing this > field would be fetched whenever this field is searched for any of the > contained values. > > I think you want to use this field differently. It would be to nice to hear > from you, before I make too many assumptions to figure out your problem and > suggest a solution. > > Cheers > Avlesh > > > On Fri, Jun 5, 2009 at 8:39 PM, Reza Safari wrote: > >> When I search for exact match on "New" I get zero results! >> q=17000219_s:New >> But when I search on 1003356 I get results! q=17000219_s: 1003356 >> And when I use wildcards I get results too! q=17000219_s: *New or >> q=17000219_s:New* or q=17000219_s:*New* >> >> Can anyone explain this? >> >> schema: >> > multiValued="true"/> >> >> Xml: >> >>1003356 >>New >>New >> >> >> >> -- >> Reza Safari >> LUKKIEN >> Copernicuslaan 15 >> 6716 BM Ede >> >> The Netherlands >> - >> http://www.lukkien.com >> t: +31 (0) 318 698000 >> >> This message is for the designated recipient only and may contain >> privileged, proprietary, or otherwise private information. If you have >> received it in error, please notify the sender immediately and delete the >> original. Any other use of the email by you is prohibited. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >
Re: Search on dynamic fields
> > When I search for exact match on "New" I get zero results! > q=17000219_s:New > But when I search on 1003356 I get results! q=17000219_s: 1003356 > And when I use wildcards I get results too! q=17000219_s: *New or > q=17000219_s:New* or q=17000219_s:*New* > Nothing your case is unexpected, Reza. Your dynamic field is a *multivalued*field which has three values. The document containing this field would be fetched whenever this field is searched for any of the contained values. I think you want to use this field differently. It would be to nice to hear from you, before I make too many assumptions to figure out your problem and suggest a solution. Cheers Avlesh On Fri, Jun 5, 2009 at 8:39 PM, Reza Safari wrote: > When I search for exact match on "New" I get zero results! > q=17000219_s:New > But when I search on 1003356 I get results! q=17000219_s: 1003356 > And when I use wildcards I get results too! q=17000219_s: *New or > q=17000219_s:New* or q=17000219_s:*New* > > Can anyone explain this? > > schema: >multiValued="true"/> > > Xml: > >1003356 >New >New > > > > -- > Reza Safari > LUKKIEN > Copernicuslaan 15 > 6716 BM Ede > > The Netherlands > - > http://www.lukkien.com > t: +31 (0) 318 698000 > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete the > original. Any other use of the email by you is prohibited. > > > > > > > > > > > > > > >
Search on dynamic fields
When I search for exact match on "New" I get zero results! q=17000219_s:New But when I search on 1003356 I get results! q=17000219_s: 1003356 And when I use wildcards I get results too! q=17000219_s: *New or q=17000219_s:New* or q=17000219_s:*New* Can anyone explain this? schema: stored="true" multiValued="true"/> Xml: 1003356 New New -- Reza Safari LUKKIEN Copernicuslaan 15 6716 BM Ede The Netherlands - http://www.lukkien.com t: +31 (0) 318 698000 This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.