Multiple uniqueKey fields
Hello, I just started using Solr and have a question regarding unique keys. Is it somehow possible to specify more than 1 unique key? The problem is, some of my indexed data has one particular unique field, while other data does not have this field at all and uses another field for unique-ness. Any suggestions on how to overcome this? Thanks, David _ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
RE: Multiple uniqueKey fields
Thanks, I thought of this shortly after I posted the question! - david > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: RE: Multiple uniqueKey fields > Date: Tue, 13 Nov 2007 15:37:46 -0500 > > key = sometimesUniqueField + "_" + otherTimesUniqueuField; > > If one of them is always guaranteed to be unique you should be fine. > > - will > > -Original Message- > From: Dave C. [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 13, 2007 2:07 PM > To: solr-user@lucene.apache.org > Subject: Multiple uniqueKey fields > > Hello, I just started using Solr and have a question regarding unique keys. > > Is it somehow possible to specify more than 1 unique key? > The > problem is, some of my indexed data has one particular unique field, > while other data does not have this field at all and uses another field > for unique-ness. > Any suggestions on how to overcome this? > > Thanks, > David > _ > Peek-a-boo FREE Tricks & Treats for You! > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us > _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
Solr java tutorial
Hi everyone, My next question is: is there a beginner's tutorial on how to programmatically query solr? I have seen some users' do things like: SolrServer server = getSolrServer(); SolrQuery solrQuery = new SolrQuery(); solrQuery.setQuery(..); QueryResponse rsp = server.query(solrQuery); But is there some tutorial that outlines the basic classes to use, etc? I know there is a javadoc but it's not helpful if I don't know what to use. Thanks a lot, David _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
RE: Solr java tutorial
I'm really confused...is SolrJ coming in Solr 1.3 (which hasn't been released yet)? It doesn't seem to be found in Solr 1.2 which I am using. please enlighten.. - David > Date: Tue, 13 Nov 2007 17:21:13 -0500 > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: Re: Solr java tutorial > > > Not yet, but there should be! > > Currently people learn it from looking at the source and tests. I > started to add something to: > > http://wiki.apache.org/solr/Solrj > > it (obviously) still needs work. > > If you are using eclipse (or similar), after typing "solrQuery." you > should get a drop down of all the available options - i find this > invaluable for learning what is possible. > > ryan > > > > Dave C. wrote: > > Hi everyone, > > > > My next question is: is there a beginner's tutorial on how to > > programmatically query solr? > > I have seen some users' do things like: > > > > > > SolrServer server = getSolrServer(); > > > > SolrQuery > > solrQuery = new SolrQuery(); > > > > > > solrQuery.setQuery(..); > > > > > > QueryResponse rsp = server.query(solrQuery); > > > > But is there some tutorial that outlines the basic classes to use, etc? > > I know there is a javadoc but it's not helpful if I don't know what to use. > > > > Thanks a lot, > > David > > > > _ > > Help yourself to FREE treats served up daily at the Messenger Café. Stop by > > today. > > http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline > _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
RE: Solr java tutorial
Ah... :( Is there a timeline for the 1.3 release? - david > Date: Tue, 13 Nov 2007 18:33:01 -0500 > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: Re: Solr java tutorial > > Dave C. wrote: > > I'm really confused...is SolrJ coming in Solr 1.3 (which hasn't been > > released yet)? > > It doesn't seem to be found in Solr 1.2 which I am using. > > > > please enlighten.. > > > > correct. solrj is in solr-1.3-dev -- to use it you need to use a nightly > build. > > It has not been officially released yet. While it is quite stable, the > interfaces are still subject to change until the final release. > > ryan _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
Embedded Solr
Hello again, This is a horribly newbie question, but what exactly is meant by "embedded solr"? Thanks a lot, David _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
'version' query parameter
Hello, How does the 'version' parameter work in a solr query? I couldn't find anything in the wikis. For example: http://localhost:8080/solr/select/?q=test&version=2.2&start=0&rows=10&indent=on Thanks, David _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
Query multiple fields
Hello, I've been trying to figure out how to query multiple fields at a time. For example, I want to do something like: description:test AND type:10. I've tried things like: "?q=description:test&type:10" etc, but I keep getting syntax errors. Can anyone tell me how this can be done? Thanks, David P.S. Perhaps the solution to this could/should be added to the FAQ/tutorial? _ You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM
RE: Query multiple fields
oh, awesome thanks -david > Date: Sun, 18 Nov 2007 15:24:00 +1300 > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: Re: Query multiple fields > > Hi David > You had it write in your example :) > > description:test AND type:10 > > But it would probably be wise to wrap any text in parenthesis: > > description:(test foo bar baz) AND type:10 > > You can find more info on the query syntax here: > http://lucene.apache.org/java/docs/queryparsersyntax.html > -Nick > On 11/18/07, Dave C. <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I've been trying to figure out how to query multiple fields at a time. > > For example, I want to do something like: description:test AND type:10. > > I've tried things like: "?q=description:test&type:10" etc, but I keep > > getting syntax errors. > > > > Can anyone tell me how this can be done? > > > > Thanks, > > David > > > > P.S. Perhaps the solution to this could/should be added to the FAQ/tutorial? > > > > _ > > You keep typing, we keep giving. Download Messenger and join the i'm > > Initiative now. > > http://im.live.com/messenger/im/home/?source=TAGLM _ You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM
RE: Query multiple fields
Hi Nick, Maybe you can help me with this related problem I am having. My query is: q=description:(test)&&!(type:10)&&!(type:14). However, my results are not as expected (55 results instead of the expected 23) The response header shows: "responseHeader":{ "status":0, "QTime":1, "params":{ "wt":"json", "!(type:10)":"", "!(type:14)":"", "indent":"on", "q":"description:(test)", "fl":"*"}}, I am confused about why the "&&!(type:10)&&!(type:14)" is not in the 'q' parameter. Any ideas? Thanks, David > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: RE: Query multiple fields > Date: Sun, 18 Nov 2007 03:18:12 + > > oh, awesome thanks > > -david > > > > > Date: Sun, 18 Nov 2007 15:24:00 +1300 > > From: [EMAIL PROTECTED] > > To: solr-user@lucene.apache.org > > Subject: Re: Query multiple fields > > > > Hi David > > You had it write in your example :) > > > > description:test AND type:10 > > > > But it would probably be wise to wrap any text in parenthesis: > > > > description:(test foo bar baz) AND type:10 > > > > You can find more info on the query syntax here: > > http://lucene.apache.org/java/docs/queryparsersyntax.html > > -Nick > > On 11/18/07, Dave C. <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > > > I've been trying to figure out how to query multiple fields at a time. > > > For example, I want to do something like: description:test AND type:10. > > > I've tried things like: "?q=description:test&type:10" etc, but I keep > > > getting syntax errors. > > > > > > Can anyone tell me how this can be done? > > > > > > Thanks, > > > David > > > > > > P.S. Perhaps the solution to this could/should be added to the > > > FAQ/tutorial? > > > > > > _ > > > You keep typing, we keep giving. Download Messenger and join the i'm > > > Initiative now. > > > http://im.live.com/messenger/im/home/?source=TAGLM > > _ > You keep typing, we keep giving. Download Messenger and join the i’m > Initiative now. > http://im.live.com/messenger/im/home/?source=TAGLM _ You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM
RE: Query multiple fields
Hi, According to the Lucene query syntax: "The symbol && can be used in place of the word AND." So, I shouldn't have to use 'AND'. If I do the same query: q=description:(test)&&!(type:10)&&!(type:14) in the Solr admin interface, I get the correct results. Re: special characters: "To escape these character use the \ before the character. For example to search for (1+1):2 use the query". I am not searching for "&&" or "!" or "(". So, I shouldn't have to escape these characters either. Is my thinking incorrect? Thanks, - David > Date: Sun, 18 Nov 2007 12:46:00 -0500 > Subject: RE: Query multiple fields > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > > > q=description:(test)&&!(type:10)&&!(type:14) > > You can't use an '&' symbol in your query (without escaping it). The boolean > operator for 'and' in Lucene is 'AND': and it is case sensitive. Your query > should probably look like: > > > q=description:test AND -type:10 AND -type:14 > > See the Lucene query syntax here: > > http://lucene.apache.org/java/docs/queryparsersyntax.html#Boolean%20operators > > Thanks, > Stu > > > -Original Message- > From: "Dave C." <[EMAIL PROTECTED]> > Sent: Sunday, November 18, 2007 1:50am > To: solr-user@lucene.apache.org > Subject: RE: Query multiple fields > > Hi Nick, > > Maybe you can help me with this related problem I am having. > My query is: q=description:(test)&&!(type:10)&&!(type:14). > > However, my results are not as expected (55 results instead of the expected > 23) > > The response header shows: > "responseHeader":{ > "status":0, > "QTime":1, > "params":{ > "wt":"json", > "!(type:10)":"", > "!(type:14)":"", > "indent":"on", > "q":"description:(test)", > "fl":"*"}}, > > I am confused about why the "&&!(type:10)&&!(type:14)" is not in the 'q' > parameter. > > Any ideas? > > Thanks, > David > > > > From: [EMAIL PROTECTED] > > To: solr-user@lucene.apache.org > > Subject: RE: Query multiple fields > > Date: Sun, 18 Nov 2007 03:18:12 + > > > > oh, awesome thanks > > > > -david > > > > > > > > > Date: Sun, 18 Nov 2007 15:24:00 +1300 > > > From: [EMAIL PROTECTED] > > > To: solr-user@lucene.apache.org > > > Subject: Re: Query multiple fields > > > > > > Hi David > > > You had it write in your example :) > > > > > > description:test AND type:10 > > > > > > But it would probably be wise to wrap any text in parenthesis: > > > > > > description:(test foo bar baz) AND type:10 > > > > > > You can find more info on the query syntax here: > > > http://lucene.apache.org/java/docs/queryparsersyntax.html > > > -Nick > > > On 11/18/07, Dave C. <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > > > > > I've been trying to figure out how to query multiple fields at a time. > > > > For example, I want to do something like: description:test AND type:10. > > > > I've tried things like: "?q=description:test&type:10" etc, but I keep > > > > getting syntax errors. > > > > > > > > Can anyone tell me how this can be done? > > > > > > > > Thanks, > > > > David > > > > > > > > P.S. Perhaps the solution to this could/should be added to the > > > > FAQ/tutorial? > > > > > > > > _ > > > > You keep typing, we keep giving. Download Messenger and join the i'm > > > > Initiative now. > > > > http://im.live.com/messenger/im/home/?source=TAGLM > > > > _ > > You keep typing, we keep giving. Download Messenger and join the i’m > > Initiative now. > > http://im.live.com/messenger/im/home/?source=TAGLM > > _ > You keep typing, we keep giving. Download Messenger and join the i’m > Initiative now. > http://im.live.com/messenger/im/home/?source=TAGLM > _ Put your friends on the big screen with Windows Vista® + Windows Live™. http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_102007
RE: Query multiple fields
okay thanks for the details - David > Date: Sun, 18 Nov 2007 22:14:23 -0500 > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: Re: Query multiple fields > > On Nov 18, 2007 9:58 PM, Dave C. <[EMAIL PROTECTED]> wrote: > > According to the Lucene query syntax: > > "The symbol && can be used in place of the word AND." So, I shouldn't > > have to use 'AND'. > > Yes, but before the query parser can even get the query string, the > servlet container parses query args and & is a delimiter. Hence you > need to escape '&' for the sake of the servlet container. > > > If I do the same query: q=description:(test)&&!(type:10)&&!(type:14) in the > > Solr admin interface, I get the correct results. > > Right, because the browser knows to escape '&' for you. > > You need to escape '&' as %26, since that is how URL escaping works > (it has nothing to do with lucene syntax.) > > -Yonik _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
Pagination with Solr
Hello again, I'm trying to accomplish very basic pagination with my Solr search results. What I'm trying is to parse the response for "numFound:" and if this number is greater than the "rows" parameter, I send another search request to Solr with a new "start" parameter. Is there a better way to do this? Specifically, is there another way to obtain the "numFound" rather than parsing the response stream/string? Thanks a lot, David _ Share life as it happens with the new Windows Live.Download today it's FREE! http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007
Tips for searching
Hello, I was wondering if someone could offer some suggestions for a problem I am having. When I perform a query on a field using a single character, I get no results back: for example, if i search on the "description" field for the character 'a', i.e. (description:a), I get no results back. I would like to get all documents where the letter 'a' appears in the description field. I haven't played around with any of the settings in my schema.xml, so I am wondering if someone could point out how I could configure Solr such that it will return me all documents with an 'a' (or any arbitrary character) in the description field. If this could be expanded to match any sub-word (i.e. match "the" in "weather") that would be great as well. Thanks for your help, David _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
RE: Tips for searching
Actually, yes, I want to be able to match *any* single character, not just 'a'. The StopFilterFactory wiki doesn't help with that, apparently...correct? -David > From: [EMAIL PROTECTED] > To: solr-user@lucene.apache.org > Subject: RE: Tips for searching > Date: Sat, 1 Dec 2007 00:43:21 + > > > Thanks for the quick response Mike... > Ideally it should match more than just a single character, i.e. "the" in > "weather" or "pro" in "profile" or "000" in "18000". > > Would these cases be taken care of by the StopFilterFactory? > > Thanks, > david > > > > From: [EMAIL PROTECTED] > > Subject: Re: Tips for searching > > Date: Fri, 30 Nov 2007 16:40:41 -0800 > > To: solr-user@lucene.apache.org > > > > On 30-Nov-07, at 4:27 PM, Dave C. wrote: > > > > > When I perform a query on a field using a single character, I get > > > no results back: for example, if i search on the "description" > > > field for the character 'a', i.e. (description:a), I get no results > > > back. I would like to get all documents where the letter 'a' > > > appears in the description field. > > > > > > I haven't played around with any of the settings in my schema.xml, > > > so I am wondering if someone could point out how I could configure > > > Solr such that it will return me all documents with an 'a' (or any > > > arbitrary character) in the description field. If this could be > > > expanded to match any sub-word (i.e. match "the" in "weather") that > > > would be great as well. > > > > Any single character, or just 'a'? IR systems often strip out stop > > words (extremely common) words for efficiency reasons. This is > > configured via the "StopFilterFactory" in schema.xml: just remove it > > from the field you are interested in and reindex. > > > > -Mike > > _ > Share life as it happens with the new Windows Live.Download today it's FREE! > http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007 _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
RE: Tips for searching
Thanks for the quick response Mike... Ideally it should match more than just a single character, i.e. "the" in "weather" or "pro" in "profile" or "000" in "18000". Would these cases be taken care of by the StopFilterFactory? Thanks, david > From: [EMAIL PROTECTED] > Subject: Re: Tips for searching > Date: Fri, 30 Nov 2007 16:40:41 -0800 > To: solr-user@lucene.apache.org > > On 30-Nov-07, at 4:27 PM, Dave C. wrote: > > > When I perform a query on a field using a single character, I get > > no results back: for example, if i search on the "description" > > field for the character 'a', i.e. (description:a), I get no results > > back. I would like to get all documents where the letter 'a' > > appears in the description field. > > > > I haven't played around with any of the settings in my schema.xml, > > so I am wondering if someone could point out how I could configure > > Solr such that it will return me all documents with an 'a' (or any > > arbitrary character) in the description field. If this could be > > expanded to match any sub-word (i.e. match "the" in "weather") that > > would be great as well. > > Any single character, or just 'a'? IR systems often strip out stop > words (extremely common) words for efficiency reasons. This is > configured via the "StopFilterFactory" in schema.xml: just remove it > from the field you are interested in and reindex. > > -Mike _ Share life as it happens with the new Windows Live.Download today it's FREE! http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007
Meaning of "max clauses 1024" error
Hello, I'm curious as to the meaning of a certain exception I am receiving. If i try a query such as "*", I get an exception which basically says there is a maximum of 1024 clauses for a BooleanQuery. However, if I enter "*:*" it matches all documents and returns them. Can someone explain to me what happens when the query is "*" versus a query for "*:*"? Thanks, David _ i’m is proud to present Cause Effect, a series about real people making a difference. http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect