Re: exact matches not possible?

2008-01-31 Thread Jörg Kiegeland
I guess you can try specifying your search as a filter query e.g. q=blabla&fq=X:"blabla", which will give back only the exact match. I tried this syntax in may Firefox URL field, however seems not to help. How do I specify a filter query with Solrj (i.e. using SolrQuery)?

exact matches not possible?

2008-01-31 Thread Jörg Kiegeland
Normally I do substring-queries on my field named X. Now however I also require exact-match queries, however I do not know how to do this! If I do X:"blabla" or X:blabla .. all documents containing "blabla" in field X are returned. However these are much too much, since I know there is exa

Sorting within groups of equal-scored result documents

2008-01-11 Thread Jörg Kiegeland
Hello, I have a query of the form (a or b). Documents matching this query are returned in the order how many conditions are actually fullfilled. E.g. 1. doc matching a and b 2. doc matching a and b 3. doc matching a 4. doc matching a 5. doc matching a 6. doc matching b Now I want, that withi

Re: Backup of a Solr index

2008-01-04 Thread Jörg Kiegeland
A postCommit hook (configured in solrconfig.xml) is called in a safe place for every commit. You could have a program as a hook that normally did nothing unless you had previously signaled to make a copy of the index. Then I will give the postCommit trigger a try and hope that while the trig

Re: Backup of a Solr index

2008-01-04 Thread Jörg Kiegeland
If you want to copy the hard files from the data/index directory, yes, you'll probably want to shut down the server first. You may be able to get away with leaving the server up but stopping any index/commit operations, but I could be wrong. How do I stop remote clients to do index/commit

Re: Backup of a Solr index

2008-01-03 Thread Jörg Kiegeland
Charlie Jackson wrote: Solr indexes are file-based, so there's no need to "dump" the index to a file. But however one has first to shutdown the Solr server before copying the index folder? In terms of how to create backups and move those backups to other servers, check out this page http://

Backup of a Solr index

2008-01-02 Thread Jörg Kiegeland
Is there a standard way to dump the Solr index to a file or to a directory as backup, and to import a such saved index to another Solr index later? Another question I have, is whether one is allowed to copy the /data/index folder while the Solr server is still running, as easy alternative t

Re: Tomcat has a HTTP Post bug?

2007-12-17 Thread Jörg Kiegeland
It was perhaps not clear in my first mail, but in Jetty, HTTP-Post perfectly works, it does not work with Tomcat however. So the question is: Has Jetty a bug (that it works but it shouldn't) or has Tomcat a bug (that it conforms to some standard so that it is not allowed to work)? And has anyon

Re: Tomcat has a HTTP Post bug?

2007-12-17 Thread Jörg Kiegeland
When you use POST, you can and should specify the charset. If you are doing this, it should work. Where can I do this? Have you any example? I have a QueryRequest instance, a SolrQuery and a SolrServer instance and set the query by solrQuery.setQuery(query) where "query" is a String cont

Tomcat has a HTTP Post bug?

2007-12-17 Thread Jörg Kiegeland
As I read, that Tomcat would need to be configured to support international characters in a HTTP Get, I determined to use a HTTP Post instead. Testing our Solr integration worked with testcases using Jetty perfectly, however it turned out that HTTP Post in combination with a query containing in

Bug with deleteByQuery

2007-12-14 Thread Jörg Kiegeland
When I execute deleteByQuery, and afterwards I add new documents which match this query, then these documents are deleted though I added the documents AFTER the call to deleteByQuery . (Even a call of commit() seems not to help.) Any idea? PS: I use communication via HTTP /solrj / nightly buil

Re: sint not works when omitted or Integer.MAX_VALUE?

2007-12-14 Thread Jörg Kiegeland
There is a bug but it is not the bug I just described.. to follow..

sint not works when omitted or Integer.MAX_VALUE?

2007-12-14 Thread Jörg Kiegeland
Hi, I have following field definition: ("slong" as defined in the Solr example schema). Now initially my Solr index is empty. I realized that as long as I do not add a document which defines a value for X which is not Integer.MAX_VALUE, documents added to the index get completely lost!

Re: Two Solr Webapps, one folder for the index data?

2007-12-11 Thread Jörg Kiegeland
I actually have a patch for solr config parser which allows you to use context environment variables in the solrconfig.xml I generally use it for development when I'm working with multiple instances and different data dirs. I'll add it to jira today if you want it. That would be nice. Howeve

Two Solr Webapps, one folder for the index data?

2007-12-11 Thread Jörg Kiegeland
I have successfully configured two parallel Solr webapps , however I see that all data gets stored in one folder of my Tomcat installation, namely C:\Tomcat\solr\data\index. How can I configure that each Solr webapp shall store the data in the folders I assigned at , where already the Solr

Tomcat6?

2007-12-03 Thread Jörg Kiegeland
the folder $CATALINA_HOME/work/Catalina/localhost, but with no success.. (I can query the top level page, but the "Solr Admin" link then not works). Can anybody help? -- Dipl.-Inf. Jörg Kiegeland ikv++ technologies ag Bernburger Strasse 24-25, D-10963 Berlin e-mail: [EMAIL P

two solr instances?

2007-11-27 Thread Jörg Kiegeland
Is it possible to deploy solr.war once to Tomcat (which is on top of an Apache HTTP Server in my configuration) which then can manage two Solr indexes? I have to make accessible two different Solr indexes (both have different schema.xml files) over the web. If the above architecture is not po

Re: Document update based on ID

2007-11-22 Thread Jörg Kiegeland
Yes, SOLR-139 will eventually do what you need. The most recent patch should not be *too* hard to get running (it may not apply cleanly though) The patch as is needs to be reworked before it will go into trunk. I hope this will happen in the next month or so. As for production? It depend

Re: Performance problems for OR-queries

2007-11-22 Thread Jörg Kiegeland
1. Does Solr support this kind of index access with better performance ? Is there anything special to define in schema.xml? No... Solr uses Lucene at it's core, and all matching documents for a query are scored. So it is not possible to have a "google" like performance with Solr, i.e.

Performance problems for OR-queries

2007-11-21 Thread Jörg Kiegeland
I have N keywords and execute a query of the form keyword1 OR keyword2 OR .. OR keywordN The search result would be very large (some million), so I defined a result limit of 100. However Solr seems now to calculates for every possible result document the number of matched keywords and to order

Set result limit to MAX_VALUE causes NullPointerException

2007-11-15 Thread Jörg Kiegeland
Hi, if I do a query and set the result limit to Integer.MAX_VALUE, it causes following exception: org.apache.solr.client.solrj.SolrServerException: Error executing query at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:86) at org.apache.solr.client.solrj.i

DINSTINCT ON functionality in Solr?

2007-11-12 Thread Jörg Kiegeland
Is there a way to define a query in that way that a search result contains only one representative of every set of documents which are equal on a given field (it is not important which representative document), i.e. to have the DINTINCT ON-concept from relational databases in Solr? If this ca

Re: Trim filer active for solr.StrField ?

2007-11-12 Thread Jörg Kiegeland
what is your specific SolrQuery? calling: query.setQuery( " stuff with spaces " ); does not call trim(), but some other calls do. My query looks e.g. (myField:"_T8sY05EAEdyU7fJs63mvdA" OR myField:"_T8sY0ZEAEdyU7fJs63mvdA" OR myField:"_T8sY0pEAEdyU7fJs63mvdA") AND NOT myField:"_T8sY1JEAE

Trim filer active for solr.StrField ?

2007-11-09 Thread Jörg Kiegeland
I have defined a field in the solr schema of type "string" which is associated with solr.StrField . As it seems, strings with spaces as prefix or suffix are written in the index correctly and if I view the contents of the index with the web interface the spaces are still there. But if I use t

Where to set result limit using SolrServer interface?

2007-11-06 Thread Jörg Kiegeland
I have a query SolrServer server = getSolrServer(); SolrQuery solrQuery = new SolrQuery(); solrQuery.setQuery(..); QueryResponse rsp = server.query(solrQuery); Now where can I set the result limit for this query? Another question : Where can I download the test cases

Re: Using Embedded and HTTP Post alternatively

2007-11-06 Thread Jörg Kiegeland
If you need to allow HTTP access to solr, then just use standard solr with your embedded stuff in a custom request handler (or something). Any other path, you will be re-inventing many wheels. If at all possible, I reccomend checking out: http://wiki.apache.org/solr/Solrj this is nice becaus

Using Embedded and HTTP Post alternatively

2007-10-29 Thread Jörg Kiegeland
Hi, I have written code using the Embedded API from SOLR. Now there is the requirement for access to a remote server, so I would need to use HTTP Post. So is it possible to wrap Embedded API into HTTP Post calls? If not, how difficult would it be in general to translate the example at http://wi