specify index location
hi everyone, my first post on this mailing list. let me just shout a big thanks to everyone involved in this wonderful project. only working with solr & lucene for a little while, and am already getting happy with the results:) the question is - is it possible to tell a solr instance the location of its index (to set it to something else than <[solrhome]/data/index>?) one of my indexes is fairly huge and i wouldn't like to copy it to my machine from the server every time i reindex. the server solr instance needs to run constantly since other parts of our system-in-work are using it (so it's not suitable for developing on). the index i test my handlers with and the server one must be identical for general comparibility. i can map a server location as a local path. thank you for your replies. david p. -- View this message in context: http://www.nabble.com/specify-index-location-tf4748921.html#a13579375 Sent from the Solr - User mailing list archive at Nabble.com.
Re: specify index location
Thanks Grant. Solrconfig.xml was the first place I looked into, but somehow missed it *scratches head*... Just a remark: Might be a good idea to change this to ./data/index to reflect the location that is expected in there. D. Grant Ingersoll-6 wrote: > > Have a look at the solrconfig.xml file (explained at > http://wiki.apache.org/solr/SolrConfigXml) > and the dataDir setting. You can, also, move your Solr home and you > could also try a symbolic link. > > Cheers, > Grant > > On Nov 4, 2007, at 6:47 PM, evol__ wrote: > >> >> hi everyone, my first post on this mailing list. let me just shout a >> big >> thanks to everyone involved in this wonderful project. only working >> with >> solr & lucene for a little while, and am already getting happy with >> the >> results:) >> >> the question is - is it possible to tell a solr instance the >> location of its >> index (to set it to something else than <[solrhome]/data/index>?) >> >> one of my indexes is fairly huge and i wouldn't like to copy it to my >> machine from the server every time i reindex. the server solr >> instance needs >> to run constantly since other parts of our system-in-work are using >> it (so >> it's not suitable for developing on). the index i test my handlers >> with and >> the server one must be identical for general comparibility. >> >> i can map a server location as a local path. >> >> thank you for your replies. >> david p. >> >> -- >> View this message in context: >> http://www.nabble.com/specify-index-location-tf4748921.html#a13579375 >> Sent from the Solr - User mailing list archive at Nabble.com. >> > > -- > Grant Ingersoll > http://lucene.grantingersoll.com > > Lucene Boot Camp Training: > ApacheCon Atlanta, Nov. 12, 2007. Sign up now! http://www.apachecon.com > > Lucene Helpful Hints: > http://wiki.apache.org/lucene-java/BasicsOfPerformance > http://wiki.apache.org/lucene-java/LuceneFAQ > > > > -- View this message in context: http://www.nabble.com/specify-index-location-tf4748921.html#a13600800 Sent from the Solr - User mailing list archive at Nabble.com.
"value boosts"? (boosting a multiValued field's data)
Hi. Is the "expansion" method described in the following year old post still the best available way to do this? http://www.nabble.com/newbie-Q-regarding-schema-configuration-tf1814271.html#a4956602 The way I understand it, indexing these First val Less important value would just make the boost "0.8" field-wide? Best regards, D. -- View this message in context: http://www.nabble.com/%22value-boosts%22--%28boosting-a-multiValued-field%27s-data%29-tf4756146.html#a13600992 Sent from the Solr - User mailing list archive at Nabble.com.
FunctionQuery in a custom request handler
I'm trying to pull off a "time bias", "article freshness" thing - boosting recent documents based on a "published_date" field. The reasonable way to do this seems using a FunctionQuery. But all the examples I find are for expressing this through the query parser; I'd need to do this inside my custom, plugged request handler. How do I access the ValueSource for my DateField? I'd like to use a ReciprocalFloatFunction from inside the code, adding it aside others in the main BooleanQuery. Thanks for the replies. David -- View this message in context: http://www.nabble.com/FunctionQuery-in-a-custom-request-handler-tp14838957p14838957.html Sent from the Solr - User mailing list archive at Nabble.com.
custom handler results don't seem to match manually entered query string
Hi, my problem is as follows: my request handler's code filters = null; DocListAndSet docs_main = searcher.getDocListAndSet(query, filters, null, start, rows, flags); String querystr = query.toString(); rsp.add("QUERY_main", querystr); gives zero responses: ((text:Travel text:Home text:Online_Archives text:Ireland text:Consumer_Information text:Regional text:Europe text:News text:Complaints text:CNN.com text:February text:Transport text:Airlines)^0.3) While copying the "QUERY_main" string into Solr admin returns full of them: (text:Travel text:Home text:Online_Archives text:Ireland text:Consumer_Information text:Regional text:Europe text:News text:Complaints text:CNN.com text:February text:Transport text:Airlines)^0.3 10 2.2 − Please help me understand what's going on, I'm a bit confused atm. Thanks :-) -- View this message in context: http://www.nabble.com/custom-handler-results-don%27t-seem-to-match-manually-entered-query-string-tp15544268p15544268.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: custom handler results don't seem to match manually entered query string
Can I provide some additional information of any kind? -- View this message in context: http://www.nabble.com/custom-handler-results-don%27t-seem-to-match-manually-entered-query-string-tp15544268p15590448.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: custom handler results don't seem to match manually entered query string
Hoss thanks, hm it might be a problem with not (specifically..) using analyzers. But I always thought such code: Term term = new Term("text", str); TermQuery tq = new TermQuery(term); query.add(tq, Occur.SHOULD); would get query terms through analyzers - since they are specified under ... Is that not true? Cheers. D. hossman wrote: > > > Hmmm... everything seems right here. > > This may be a silly question, but > you are calling rsp.add("response", docs_main.docList) in your custom > handler correct? > > second question: how are you building up your query obejct? the only > thing i can think of is that you are constructing the TermQueries directly > (without using the analyzer) so they don't match what's really in the > index (ie: things aren't being lowercased, not splitting on "." and "_") > but when you cut/paste the query string into standard request handler it > uses the QueryParser which does the proper analysis. > > what does debugQuery=true say about your query when you cut/paste the > query string? > > can you post the full code of your custo mrequest handler? > > > : Hi, > : my problem is as follows: my request handler's code > : > : filters = null; > : DocListAndSet docs_main = searcher.getDocListAndSet(query, filters, > null, > : start, rows, flags); > : String querystr = query.toString(); > : rsp.add("QUERY_main", querystr); > : > : > : gives zero responses: > : > : ((text:Travel text:Home text:Online_Archives > : text:Ireland text:Consumer_Information text:Regional text:Europe > text:News > : text:Complaints text:CNN.com text:February text:Transport > : text:Airlines)^0.3) > : > : > : > : While copying the "QUERY_main" string into Solr admin returns full of > them: > : > : > : (text:Travel text:Home text:Online_Archives text:Ireland > : text:Consumer_Information text:Regional text:Europe text:News > : text:Complaints text:CNN.com text:February text:Transport > text:Airlines)^0.3 > : > : 10 > : 2.2 > : > : > : ÿÿ > : > : > : > : > : Please help me understand what's going on, I'm a bit confused atm. > Thanks > : :-) > > -Hoss > > -- View this message in context: http://www.nabble.com/custom-handler-results-don%27t-seem-to-match-manually-entered-query-string-tp15544268p15629988.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: FunctionQuery in a custom request handler
Hi again, digging this one up. This is the code I've used in my handler. ReciprocalFloatFunction tb_valuesource; tb_valuesource = new ReciprocalFloatFunction(new ReverseOrdFieldSource(TIMEBIAS_FIELD), m, a, b); FunctionQuery timebias = new FunctionQuery(tb_valuesource); // adding to main query BooleanQuery main = new BooleanQuery(); other_queries.setBoost(BOOST_OTHER_QUERIES); main.add(other_queries); timebias.setBoost(BOOST_TIMEBIAS); main.add(timebias); It worked, but the problem is that I fail to get a decent ration between my "other_queries" and "timebias". I would like to keep timebias at ~15% max (for totally fresh docs), kind of dropping to nothing at ~one week olds. Adding to BooleanQuery sums the subquery scores, so I guess there's no way of controlling the ratio, right? What I tried to do is to use multiplication: // this part stays the same ReciprocalFloatFunction tb_valuesource; tb_valuesource = new ReciprocalFloatFunction(new ReverseOrdFieldSource(TIMEBIAS_FIELD), m, a, b); FunctionQuery timebias = new FunctionQuery(tb_valuesource); ConstValueSource tb_const = new ConstValueSource(1.0f); ValueSource[] tb_summa_arr = {tb_const, tb_valuesource}; SumFloatFunction tb_summa = new SumFloatFunction(tb_summa_arr); QueryValueSource query_vs = new QueryValueSource(query, DEF_VAL); ValueSource[] vs_arr = {query_vs, tb_summa}; ProductFloatFunction pff = new ProductFloatFunction(vs_arr); FunctionQuery THE_QUERY = new FunctionQuery(pff); docs.docList = searcher.getDocList(THE_QUERY, filters, null, start, rows, flags); (All of the float tweakish values are ofcourse foo.) The problem is this crashes at the last line with Mar 20, 2008 6:59:57 PM org.apache.solr.common.SolrException log SEVERE: java.lang.NullPointerException at si.david.MyRequestHandler.handleRequestBody(Unknown Source) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:117) at org.apache.solr.core.SolrCore.execute(SolrCore.java:815) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:206) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:174) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619) I'm using a nightly build from late November. Any ideas? Does what I am doing make any sense? Is there any other way to accomplish what I'm trying to do? I'm kind of lost here, thanks for the info. D. hossman wrote: > > > : How do I access the ValueSource for my DateField? I'd like to use a > : ReciprocalFloatFunction from inside the code, adding it aside others in > the > : main BooleanQuery. > > The FieldType API provides a getValueSource method (so every FieldType > picks it's own best ValueSource implementaion). > > > -Hoss > > > -- View this message in context: http://www.nabble.com/FunctionQuery-in-a-custom-request-handler-tp14838957p16186230.html Sent from the Solr - User mailing list archive at Nabble.com.