Re: How to achieve combination of features grouping, scoring...
On Tue, 2009-01-13 at 09:56 -0800, Otis Gospodnetic wrote: > Hi, > > I don't think you can do any of that with Solr as it exists today. My > feeling is that you might want to model this new functionality/code after > what's in SOLR-236, even though it's not the same thing as yours, or after > the carrot2 plugin. I also have a feeling others might like this > functionality, too, so if you can generalize and contribute, please consider > doing that. > Ok, thanks for the anwser. I had a look at the CollapseComponent. I'm not familiar with any of the classes in SOLR and there is no documentation beside the javadocs (no structure, dependency description of the classes). So while it doesn't look too complicated to do it takes a lot of time to get into the solr mechanics. In my project I need something working really quick. So I will postpone the SOLR discovery for a while. Norbert > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message > > From: Norbert Hartl > > To: SOLR mailing list > > Sent: Tuesday, January 13, 2009 3:19:33 AM > > Subject: How to achieve combination of features grouping, scoring... > > > > Hi, > > > > I spent some time on solr in order to figure out what > > it can do. I sill have some problems finding the right > > way to do my search. > > > > I have a bunch of heterogenous objects that I want to > > search. All of these objects belong to an owner. When > > a search is issued I like not only to find the individual > > objects but the grouped by their owner. > > > > For grouping I didn't find much valuable other than to > > do this with a response writer. I tried collapsing but > > this is not what I mean. And facets are still something > > different. The only thing is the XSLTResponseWriter that > > does grouping of stuff afterwards. > > > > What is the best way to achieve this: > > > > - how to group stuff when there are many results to take > > into account > > - how to score based on grouped objects. To group with > > the response writer is not hard. But if I want to do > > pagination I like to have the top scored group at the > > top of the results. Is there a way to do so? > > - I like to only show the fields that match a query. As > > someone hinted here on the ML doing this with highlighting > > is the only way I found. But then I don't understand that > > I can provide a field list (hl.fl) but this does not take > > a * for every field like some of the other parameters do. > > > > Thanks in advance, > > > > Norbert >
Re: What do we mean by Searcher?
Thanks a lot Otis! I will definitely look into Lucene for more information on Searchers. WIth respect to Solr, I have a quick question - If I restart Solr server, and search, then definitely a new Searcher would be initialized. As per my understanding, stopping the server should close the Searchers as well. Is it correct assumption? Thanks, Manu Otis Gospodnetic wrote: > > Manu, > > If you truly want to get a better feeling for the notion of a Searcher, my > advice is to play with Lucene a little bit first. Do you have a copy of > Lucene in Action? You get get a cheaper version online on > manning.com/hatcher2 if you want and quickly read a bit about Searcher in > one of the early chapters. In short, the searcher is the object/the thing > that performs searches against an index. > > More answers to your questions below. > > >> We use Data Import feature of Solr to index database tables. Now, I send >> a >> query(*:*) through Solr Admin console for searching. And I get back >> search >> result. In this whole process, I have following questions - >> 1. What is the significance of Searcher in this case? > > The searcher is the thing that performed the search. It took your query > string, opened an index, ran the search, and got results. > >> 2. When is Searcher invoked? > > When you run a search request. > >> 3. Who invokes Searher? > > You do, when you call one of the SearchComponents or RequestHandlers, when > you run a search request. > >> 4. Where it is Stored? > > Searcher is not really "stored". It's a piece of code that runs inside > Solr, which runs inside a servlet container, which runs inside a JVM, and > so on. > >> 5. When I send another query (manu:abc), will a new Searcher created? > > No, the same searcher will be used unless you told Solr to open a new > Searcher. > >> 6. How is searcher auto-warmed in this case? > > http://wiki.apache.org/solr/?action=fullsearch&context=180&value=autowarm&fullsearch=Text > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message >> From: Manupriya >> To: solr-user@lucene.apache.org >> Sent: Tuesday, January 13, 2009 9:25:02 AM >> Subject: What do we mean by Searcher? >> >> >> Hi, >> >> I am somehow new to Solr. While reading through documents/resources, I >> have >> come across 'Searcher' term many times. I am able to roughly undestand, >> that >> whenever we fire any query, we are actually invoking a searcher. This >> searcher searches through the index and returns results. >> >> But I am not able to fully grasp its meaning. I refered a previous post >> as >> well - http://www.nabble.com/what-is-searcher-td15448682.html#a15448682. >> >> I have also read through - >> http://lucene.apache.org/java/2_3_0/api/org/apache/lucene/search/Searcher.html#Searcher() >> >> >> But I am not able fully appreciate it. >> >> I want to understand Searcher in a practical scenario - >> >> We use Data Import feature of Solr to index database tables. Now, I send >> a >> query(*:*) through Solr Admin console for searching. And I get back >> search >> result. In this whole process, I have following questions - >> 1. What is the significance of Searcher in this case? >> 2. When is Searcher invoked? >> 3. Who invokes Searher? >> 4. Where it is Stored? >> 5. When I send another query (manu:abc), will a new Searcher created? >> 6. How is searcher auto-warmed in this case? >> >> Can anyone please direct me to some tutorial/resource for this? >> >> Thanks, >> Manu >> -- >> View this message in context: >> http://www.nabble.com/What-do-we-mean-by-Searcher--tp21436737p21436737.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/What-do-we-mean-by-Searcher--tp21436737p21453784.html Sent from the Solr - User mailing list archive at Nabble.com.
place log4j.properties
Hey there, I have changed the log system in the nightly build to log4j following this comment: http://wiki.apache.org/solr/SolrLogging Everything is loaded correclty but I am geting this INFO: log4j:WARN No appenders could be found for logger (org.apache.solr.servlet.SolrDispatchFilter). log4j:WARN Please initialize the log4j system properly. I think the problem is that the wepapp is not finding the log4j.properties. I have tryed placing it in the firs class level: ./WEB-INF/classes/org/apache/solr/servlet/ But doesn't seem to recognize it... Any advice? Thanks in advance -- View this message in context: http://www.nabble.com/place-log4j.properties-tp21454379p21454379.html Sent from the Solr - User mailing list archive at Nabble.com.
What can be the reason for stopping solr work after some time?
Hi, i'm newbie with solr. We have installed with together with ezfind from EZ Publish web sites and it is working. But in one of the servers we have this kind of problem. It works for example for 3 hours, and then in one moment it stop to work, searching and indexing does not work. We have set this the in init script: JAVA_VMOPTIONS="-Dezfind -Xms512M -Xmx512M" What can be the reason for this, i suppose this is a memory issue, but i'm not sure. Bacause in this system i see that sometimes swap is also using. Thanks in advanced! Regards, Ali Nebi!
Re: Clustering Carrot2 + Solr
No problem, please add any and all comments onto the JIRA issue. Especially your take on the formats, etc. I will probably get to committing by the end of the month. Also, do you have any interest in other clustering algorithms? I have in my head to allow for Mahout to do "offline" clustering of the whole collection, but haven't worked through the details of that just yet. -Grant On Jan 13, 2009, at 9:46 AM, Jean-Philip EIMECKE wrote: Thank you so much Grant Cheers -- Jean-Philip Eimecke jpeime...@gmail.com
Issue with dismaxrequestHandler for date fields
Hi, We are facing issues while using dismaxrequesthandler for date fields. We have to define date fields in of solrConfig.xml. productPublicationDate_product_dt^1.0 productPublicationDate_product_dt[NOW-45DAYS TO NOW]^1.0 as soon as we add this in solrConfig.xml, dismax stops working for other attributes. ?q=searchterm&qt=dismaxrequest gives error saying that searchterm is invalid date field. This is because dismax request tries to search the term in all the attributes defined in tag, Is there any way to avoid this search. Please suggest what should we do to solve the issue. Thanks, -- View this message in context: http://www.nabble.com/Issue-with-dismaxrequestHandler-for-date-fields-tp21455862p21455862.html Sent from the Solr - User mailing list archive at Nabble.com.
Question about query sintax
Hello, If I query for 'ferrar*' on my index, I will get 'ferrari' and 'red ferrari' as a result. And that's fine. But if I try to query for 'red ferrar*', I have to put it between double quotes as I want to grant that it will be used as only one term, but the '*' is being ignored, as I don't get any result. What should be the apropriate query for it? FYI I am querying one standard text field. - http://www.nabble.com/RPG-da-Ilha-f35514.html RPG da Ilha -- View this message in context: http://www.nabble.com/Question-about-query-sintax-tp21455970p21455970.html Sent from the Solr - User mailing list archive at Nabble.com.
How spell checker accuracy works ??
Hi all Please suggest me any link or documentation which will help me to understand the working of accuracy on solr server. For example: Accuracy tag is used in Solrconfig.xml file in below manner. textSpell default solr.spelling.FileBasedSpellChecker ./spellings.txt UTF-8 ./spellcheckerFile 0.70 As per above description, the accuracy set to 0.70 which means to 70% The keyword ( java ) is stored in spellings.txt file which is also mentioned above. Now if I try to make search for "jav" word, there is no result found (This is the problem, why there is no result ??) where as If I replace (java) keyword with (javas) in spellings.txt file and keep the accuracy 0.70 ... Now if I try to make search for "jav" word, I start getting the results ... What is this behaviour ?? Does anyone knows what is the reason ... Regards, Navdeep -- View this message in context: http://www.nabble.com/How-spell-checker-accuracy-workstp21456489p21456489.html Sent from the Solr - User mailing list archive at Nabble.com.
How to do Query on multiple parameters
Our requirement is to make solr query on two or more attributes. for example the search criteria is DaVinci AND price between 10 TO 40 The query i am using is ; ?q=DaVinci&q=Price:[10 TO 40] this query is returning me results for first query parameter only (?q=DaVinc). What should be the query for such multiple parameters. Thanks, Prerna -- View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p21457148.html Sent from the Solr - User mailing list archive at Nabble.com.
Single facet on multiple attributes
Hi, How can we create single facet on multiple attributes? Thanks, -- View this message in context: http://www.nabble.com/Single-facet-on-multiple-attributes-tp21457259p21457259.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: How to do Query on multiple parameters
Isn't this a single query on 2 parameters/fields? Try q=DaVinci AND Price:[10 TO 40] -Original Message- From: prerna07 [mailto:pkhandelw...@sapient.com] Sent: Wednesday, January 14, 2009 8:07 PM To: solr-user@lucene.apache.org Subject: How to do Query on multiple parameters Our requirement is to make solr query on two or more attributes. for example the search criteria is DaVinci AND price between 10 TO 40 The query i am using is ; ?q=DaVinci&q=Price:[10 TO 40] this query is returning me results for first query parameter only (?q=DaVinc). What should be the query for such multiple parameters. Thanks, Prerna -- View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p 21457148.html Sent from the Solr - User mailing list archive at Nabble.com.
How to get XML response from CommonsHttpSolrServer through QueryResponse?
Dear All, Until now we have used Solr from a servlet in which we built the solr URL, and used response.sendRedirect(url) to send the query to solr, and have it translate its XML results, through XSLT, to HTML. We now want to do the XML/XSL translation process ourselves, and to accomplish that I no longer redirect my servlet to the solr url, but use a CommonsHttpSolrServlet to which I pass the parameters using ModifiableSolrParams: CommonsHttpSolrServer server = new CommonsHttpSolrServer("http://localhost:8080/kannada/db";); server.setParser(new XMLResponseParser()); ModifiableSolrParams params = new ModifiableSolrParams(); params.set("q", searchTerms); params.set("q.op", combination); QueryResponse solrResponse = null; try{ solrResponse = server.query(params); } catch(Exception e) { System.out.println("Exception occured in SOLR"); } When I so a System.out(solrResponse), I get: {responseHeader={status=0,QTime=141,params={q=library,q.op=AND,wt=xml,version=2.2}},response={numFound=180,start=0,docs=[SolrDocument[{timestamp=Wed Jan 07 16:36:51 CET 2009, sum (...) Because I used server.setParser(new XMLResponseParser()), I get the wt=xml parameter in the responseHeader, but the format of the responseHeader is clearly no XML at all. I expect Solr does output XML, but that the QueryResponse, when I print its contents, formats this as the string above. Is there any way to directly obtain Solr's XML output? Kind regards, and many thanks in advance, Maarten Buiter
dealing with logs - feature advice based on a use case
Hey there, Just want to explain a feature I think would be really useful for the future. In my use case I need a log per core. I spoke about this feature before. My idea was to separate the logs with log4j but saw it was not that easy. In the other thread we spoke about passing the core name to the loggers. Do that would be so much hacking so I decided not to do that (otherwise would be almost impossible to upgrade to new releases). I think would be great to have it in Solr. To solve it, what I have done is use log4j and log all messages in the syslog. Once in there I have bash scripts that redirect the messages depending on the core name they have. Apparently this would solve my problem but there are lots of messages that haven't the core name so I can't redirect them to the needed log file. So, another possible solution would be to have the core name in all log messages. Don't you think would be a useful in many use cases? Thanks in advance -- View this message in context: http://www.nabble.com/dealing-with-logs---feature-advice-based-on-a-use-case-tp21458747p21458747.html Sent from the Solr - User mailing list archive at Nabble.com.
0.70 || Spell Checker Issue !!
Hi all The search with an accuracy defined by user in SOLRCONFIG.XML is not working for me. I have provided an example below. Please let me know your valuable suggestion. For example: Accuracy tag is used in Solrconfig.xml file in below manner. textSpell default solr.spelling.FileBasedSpellChecker ./spellings.txt UTF-8 ./spellcheckerFile 0.70 As per above description, the accuracy set to 0.70 which means to 70% The keyword ( java ) is stored in spellings.txt file which is also mentioned above. Now if I try to make search for "jav" word, there is no result found (This is the problem, why there is no result ??) where as If I replace (java) keyword with (javas) in spellings.txt file and keep the accuracy 0.70 ... Now if I try to make search for "jav" word, I start getting the results ... What is this behaviour ?? Does anyone knows what is the reason ... Regards, Navdeep -- View this message in context: http://www.nabble.com/%3Cstr-name%3D%22accuracy%22%3E0.70%3C-str%3E-%7C%7C-Spell-Checker-Issue-%21%21-tp21460978p21460978.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: What do we mean by Searcher?
Yes, that's correct. If you stop the server then you are stopping the JVM and the searcher goes away with it. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: Manupriya > To: solr-user@lucene.apache.org > Sent: Wednesday, January 14, 2009 5:59:54 AM > Subject: Re: What do we mean by Searcher? > > > Thanks a lot Otis! > > I will definitely look into Lucene for more information on Searchers. > > WIth respect to Solr, I have a quick question - > If I restart Solr server, and search, then definitely a new Searcher would > be initialized. As per my understanding, stopping the server should close > the Searchers as well. Is it correct assumption? > > Thanks, > Manu > > > > Otis Gospodnetic wrote: > > > > Manu, > > > > If you truly want to get a better feeling for the notion of a Searcher, my > > advice is to play with Lucene a little bit first. Do you have a copy of > > Lucene in Action? You get get a cheaper version online on > > manning.com/hatcher2 if you want and quickly read a bit about Searcher in > > one of the early chapters. In short, the searcher is the object/the thing > > that performs searches against an index. > > > > More answers to your questions below. > > > > > >> We use Data Import feature of Solr to index database tables. Now, I send > >> a > >> query(*:*) through Solr Admin console for searching. And I get back > >> search > >> result. In this whole process, I have following questions - > >> 1. What is the significance of Searcher in this case? > > > > The searcher is the thing that performed the search. It took your query > > string, opened an index, ran the search, and got results. > > > >> 2. When is Searcher invoked? > > > > When you run a search request. > > > >> 3. Who invokes Searher? > > > > You do, when you call one of the SearchComponents or RequestHandlers, when > > you run a search request. > > > >> 4. Where it is Stored? > > > > Searcher is not really "stored". It's a piece of code that runs inside > > Solr, which runs inside a servlet container, which runs inside a JVM, and > > so on. > > > >> 5. When I send another query (manu:abc), will a new Searcher created? > > > > No, the same searcher will be used unless you told Solr to open a new > > Searcher. > > > >> 6. How is searcher auto-warmed in this case? > > > > > http://wiki.apache.org/solr/?action=fullsearch&context=180&value=autowarm&fullsearch=Text > > > > Otis > > -- > > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > > > > > - Original Message > >> From: Manupriya > >> To: solr-user@lucene.apache.org > >> Sent: Tuesday, January 13, 2009 9:25:02 AM > >> Subject: What do we mean by Searcher? > >> > >> > >> Hi, > >> > >> I am somehow new to Solr. While reading through documents/resources, I > >> have > >> come across 'Searcher' term many times. I am able to roughly undestand, > >> that > >> whenever we fire any query, we are actually invoking a searcher. This > >> searcher searches through the index and returns results. > >> > >> But I am not able to fully grasp its meaning. I refered a previous post > >> as > >> well - http://www.nabble.com/what-is-searcher-td15448682.html#a15448682. > >> > >> I have also read through - > >> > http://lucene.apache.org/java/2_3_0/api/org/apache/lucene/search/Searcher.html#Searcher() > > > >> > >> But I am not able fully appreciate it. > >> > >> I want to understand Searcher in a practical scenario - > >> > >> We use Data Import feature of Solr to index database tables. Now, I send > >> a > >> query(*:*) through Solr Admin console for searching. And I get back > >> search > >> result. In this whole process, I have following questions - > >> 1. What is the significance of Searcher in this case? > >> 2. When is Searcher invoked? > >> 3. Who invokes Searher? > >> 4. Where it is Stored? > >> 5. When I send another query (manu:abc), will a new Searcher created? > >> 6. How is searcher auto-warmed in this case? > >> > >> Can anyone please direct me to some tutorial/resource for this? > >> > >> Thanks, > >> Manu > >> -- > >> View this message in context: > >> http://www.nabble.com/What-do-we-mean-by-Searcher--tp21436737p21436737.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > > > -- > View this message in context: > http://www.nabble.com/What-do-we-mean-by-Searcher--tp21436737p21453784.html > Sent from the Solr - User mailing list archive at Nabble.com.
Re: Searchable and Non Searchable Fields
Hi, Your schema setup looks fine. George is no the same as Georgeon, so 2) won't match a search for FirstName:George Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: con > To: solr-user@lucene.apache.org > Sent: Wednesday, January 14, 2009 1:23:06 AM > Subject: Searchable and Non Searchable Fields > > > Hi All > > I am using dataimporthandler to index values from oracle db. > > My sample rows are like: > > 1) FirstName-> George,LastName-> Bush, Country-> US > 2) FirstName-> Georgeon, LastName-> Washington, Country-> US > 3) FirstName-> Tony, LastName-> George, Country-> UK > 4) FirstName-> Gordon,LastName-> Brown,Country-> UK > 5) FirstName-> Vladimer, LastName-> Putin, Country-> Russia > > How can i set only the FirstName field as searchable. > For eg. if I search George, I should get FirstName, LastName and Country of > first and second rows only, and if I search Bush no value should be > returned. > > I tried by providing various options for the at schema.xml > > > > > But it is not providing the exact results. > > How can I change the field attributes to get this result? Or is there > someother configs for this? > > Expecting reply > Thanks in advance > con > -- > View this message in context: > http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21450664.html > Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to do Query on multiple parameters
or perhaps better is to use fq parameters to separate out filters versus full-text queries: ?q=DaVinci&fq=Price:[10 TO 40] Erik On Jan 14, 2009, at 9:50 AM, Jana, Kumar Raja wrote: Isn't this a single query on 2 parameters/fields? Try q=DaVinci AND Price:[10 TO 40] -Original Message- From: prerna07 [mailto:pkhandelw...@sapient.com] Sent: Wednesday, January 14, 2009 8:07 PM To: solr-user@lucene.apache.org Subject: How to do Query on multiple parameters Our requirement is to make solr query on two or more attributes. for example the search criteria is DaVinci AND price between 10 TO 40 The query i am using is ; ?q=DaVinci&q=Price:[10 TO 40] this query is returning me results for first query parameter only (?q=DaVinc). What should be the query for such multiple parameters. Thanks, Prerna -- View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p 21457148.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Issue with dismaxrequestHandler for date fields
On Jan 14, 2009, at 8:24 AM, prerna07 wrote: We are facing issues while using dismaxrequesthandler for date fields. We have to define date fields in of solrConfig.xml. productPublicationDate_product_dt^1.0 productPublicationDate_product_dt[NOW-45DAYS TO NOW]^1.0 as soon as we add this in solrConfig.xml, dismax stops working for other attributes. That last line is not valid qf syntax. The syntax for qf is simply field_name^boost separated by spaces. If you want to boost by docs in the last 45 days, use that clause in a bf parameter. Erik
Import data from RSS Feed Question
Hi Solr Users, To learn solr, I worked thru Grant Ingersoll's "What's new with Apache Solr" article on Developerworks. Everything works and is setup correctly, but when I change the 'url' attribute in the entity declaration to a url on my intranet that requires basic authentication (username and password), I get a HTTP 401 error when solr attempts to read the rss feed and update the index. Question: is there a way to specify a username and password for solr to use for an HttpDataSource? Any suggestions on how to solve this issue? I've been using Lucene for awhile, but am new to solr. Solr is fantastic! Thanks for your help, .Burt -- View this message in context: http://www.nabble.com/Import-data-from-RSS-Feed-Question-tp21468562p21468562.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing the same data in many records
Thanks Otis. I tweaked the Solr example app a little and then uploaded a ~55KB document to it a couple of thousand times (changing the ID each time). The solr/data directory was 72MB on disc after adding the document 2000 times, so it seems that the index is growing by approximately 36KB for each document. That seems reasonable. I guess I need to do some research into expected data volumes now, and limits on Lucene index size. Cheers, Phil Otis Gospodnetic wrote: > > Phil, > > From what you described so far, I don't see any red flags. I would pay > attention to reading those timestamps (covered on the Wiki and ML > archives), that's all. > > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message >> From: philmccarthy >> To: solr-user@lucene.apache.org >> Sent: Tuesday, January 13, 2009 8:49:33 PM >> Subject: Indexing the same data in many records >> >> >> Hi, >> >> I'd like to use Solr to index some webserver logs, in order to allow easy >> ad-hoc querying and analysis. Each Solr Document will represent a single >> request to the webserver, with fields for time, request URL, referring >> URL >> etc. >> >> I'm also planning to fetch the page source of each referring URL, and add >> that as an indexed field in the Solr document. The aim is to allow >> queries >> like "find hits to /xyz.html where the referring page contains the word >> 'foobar'". >> >> Since hundreds or even thousands of hits may all come from the same >> referring page, would this approach be horribly inefficient? (Note the >> page >> source won't be stored in each Document, just indexed). Am I going to >> dramatically increase the index size if I do this? >> >> If so, is there a more elegant way to do what I want? >> >> Many thanks, >> Phil >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Indexing-the-same-data-in-many-records-tp21448465p21448465.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Indexing-the-same-data-in-many-records-tp21448465p21468706.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: 0.70 || Spell Checker Issue !!
Hmm, as far as I can tell, neither of those should give suggestions, as they both have edit distances less than 0.70. In the Lucene code, I ran the following test against the Levenshtein Distance: public void testJava() throws Exception { float d1 = sd.getDistance("jav", "java"); System.out.println("di: " + d1); d1 = sd.getDistance("jav", "javas"); System.out.println("di: " + d1); } It prints: di: 0.666 di: 0.333 Is "javas"/"java" the only entry in your spellings? I presume it does give you the expected suggestion or is it giving you something else? Also, what does your query look like? -Grant On Jan 14, 2009, at 12:33 PM, Navdeep wrote: Hi all The search with an accuracy defined by user in SOLRCONFIG.XML is not working for me. I have provided an example below. Please let me know your valuable suggestion. For example: Accuracy tag is used in Solrconfig.xml file in below manner. textSpell default solr.spelling.FileBasedSpellChecker ./spellings.txt UTF-8 ./spellcheckerFile 0.70 As per above description, the accuracy set to 0.70 which means to 70% The keyword ( java ) is stored in spellings.txt file which is also mentioned above. Now if I try to make search for "jav" word, there is no result found (This is the problem, why there is no result ??) where as If I replace (java) keyword with (javas) in spellings.txt file and keep the accuracy 0.70 ... Now if I try to make search for "jav" word, I start getting the results ... What is this behaviour ?? Does anyone knows what is the reason ... Regards, Navdeep -- View this message in context: http://www.nabble.com/%3Cstr-name%3D%22accuracy%22%3E0.70%3C-str%3E-%7C%7C-Spell-Checker-Issue-%21%21-tp21460978p21460978.html Sent from the Solr - User mailing list archive at Nabble.com. -- Grant Ingersoll Lucene Helpful Hints: http://wiki.apache.org/lucene-java/BasicsOfPerformance http://wiki.apache.org/lucene-java/LuceneFAQ
Re: Indexing the same data in many records
Phil, Note that adding the same document multiple times and looking at the index size is not a very good approach. You are adding a fixed number of distinct terms over and over. In real-life scenario you will have a much greater term distribution, and that will affect index size. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: philmccarthy > To: solr-user@lucene.apache.org > Sent: Wednesday, January 14, 2009 7:36:38 PM > Subject: Re: Indexing the same data in many records > > > Thanks Otis. I tweaked the Solr example app a little and then uploaded a > ~55KB document to it a couple of thousand times (changing the ID each time). > The solr/data directory was 72MB on disc after adding the document 2000 > times, so it seems that the index is growing by approximately 36KB for each > document. That seems reasonable. > > I guess I need to do some research into expected data volumes now, and > limits on Lucene index size. > > Cheers, > Phil > > > Otis Gospodnetic wrote: > > > > Phil, > > > > From what you described so far, I don't see any red flags. I would pay > > attention to reading those timestamps (covered on the Wiki and ML > > archives), that's all. > > > > > > Otis > > -- > > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > > > > > - Original Message > >> From: philmccarthy > >> To: solr-user@lucene.apache.org > >> Sent: Tuesday, January 13, 2009 8:49:33 PM > >> Subject: Indexing the same data in many records > >> > >> > >> Hi, > >> > >> I'd like to use Solr to index some webserver logs, in order to allow easy > >> ad-hoc querying and analysis. Each Solr Document will represent a single > >> request to the webserver, with fields for time, request URL, referring > >> URL > >> etc. > >> > >> I'm also planning to fetch the page source of each referring URL, and add > >> that as an indexed field in the Solr document. The aim is to allow > >> queries > >> like "find hits to /xyz.html where the referring page contains the word > >> 'foobar'". > >> > >> Since hundreds or even thousands of hits may all come from the same > >> referring page, would this approach be horribly inefficient? (Note the > >> page > >> source won't be stored in each Document, just indexed). Am I going to > >> dramatically increase the index size if I do this? > >> > >> If so, is there a more elegant way to do what I want? > >> > >> Many thanks, > >> Phil > >> > >> > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Indexing-the-same-data-in-many-records-tp21448465p21448465.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > > > -- > View this message in context: > http://www.nabble.com/Indexing-the-same-data-in-many-records-tp21448465p21468706.html > Sent from the Solr - User mailing list archive at Nabble.com.
RE: How to do Query on multiple parameters
Thanks, it works..:) Jana, Kumar Raja wrote: > > Isn't this a single query on 2 parameters/fields? > > Try q=DaVinci AND Price:[10 TO 40] > > -Original Message- > From: prerna07 [mailto:pkhandelw...@sapient.com] > Sent: Wednesday, January 14, 2009 8:07 PM > To: solr-user@lucene.apache.org > Subject: How to do Query on multiple parameters > > > > Our requirement is to make solr query on two or more attributes. for > example > the search criteria is DaVinci AND price between 10 TO 40 > The query i am using is ; > ?q=DaVinci&q=Price:[10 TO 40] > > this query is returning me results for first query parameter only > (?q=DaVinc). > > What should be the query for such multiple parameters. > > Thanks, > Prerna > -- > View this message in context: > http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p > 21457148.html > Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p21470690.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Issue with dismaxrequestHandler for date fields
Now our qf tag looks like : productPublicationDate_product_dt^1.0 Still search on any field (?q=searchTerm) gives following error "The request sent by the client was syntactically incorrect (Invalid Date String:'searchTerm')." Is this valid to define *_dt (i.e. date fields ) in solrConfig.xml ? prerna07 wrote: > > Hi, > > We are facing issues while using dismaxrequesthandler for date fields. > We have to define date fields in of solrConfig.xml. > > > productPublicationDate_product_dt^1.0 > productPublicationDate_product_dt[NOW-45DAYS TO NOW]^1.0 > > > as soon as we add this in solrConfig.xml, dismax stops working for other > attributes. > > ?q=searchterm&qt=dismaxrequest gives error saying that searchterm is > invalid date field. > This is because dismax request tries to search the term in all the > attributes defined in tag, Is there any way to avoid this search. > > Please suggest what should we do to solve the issue. > > Thanks, > > > -- View this message in context: http://www.nabble.com/Issue-with-dismaxrequestHandler-for-date-fields-tp21455862p21471265.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Searchable and Non Searchable Fields
Thanks for the reply Otis Even if we dont get both George and Georgeon, Can we have only the firstname as searchable. That is, If I search George, I should get firstname, lastname, and country of the first row, and no values from the third row should be returned Regards Con Otis Gospodnetic wrote: > > Hi, > > Your schema setup looks fine. > George is no the same as Georgeon, so 2) won't match a search for > FirstName:George > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > - Original Message >> From: con >> To: solr-user@lucene.apache.org >> Sent: Wednesday, January 14, 2009 1:23:06 AM >> Subject: Searchable and Non Searchable Fields >> >> >> Hi All >> >> I am using dataimporthandler to index values from oracle db. >> >> My sample rows are like: >> >> 1) FirstName-> George,LastName-> Bush, Country-> US >> 2) FirstName-> Georgeon, LastName-> Washington, Country-> US >> 3) FirstName-> Tony, LastName-> George, Country-> UK >> 4) FirstName-> Gordon,LastName-> Brown,Country-> UK >> 5) FirstName-> Vladimer, LastName-> Putin, Country-> Russia >> >> How can i set only the FirstName field as searchable. >> For eg. if I search George, I should get FirstName, LastName and Country >> of >> first and second rows only, and if I search Bush no value should be >> returned. >> >> I tried by providing various options for the at schema.xml >> >> >> >> >> But it is not providing the exact results. >> >> How can I change the field attributes to get this result? Or is there >> someother configs for this? >> >> Expecting reply >> Thanks in advance >> con >> -- >> View this message in context: >> http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21450664.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21471595.html Sent from the Solr - User mailing list archive at Nabble.com.