Re: How to get a field that starts with a minus?

2011-02-20 Thread Paul Tomblin
Feb 20, 2011 at 11:17 AM, Markus Jelsma wrote: > He could also just escape it or am i missing something? > >> --- On Sun, 2/20/11, Paul Tomblin wrote: >> > From: Paul Tomblin >> > Subject: Re: How to get a field that starts with a minus? >> > To: solr

Re: How to get a field that starts with a minus?

2011-02-20 Thread Paul Tomblin
On Sun, Feb 20, 2011 at 10:15 AM, Paul Tomblin wrote: > I have a field in my database, "id", which is the unique key.  The id > is generated as an MD5 hash of some of the other data in the record, > and unfortunately the way I converted it to hex meant that sometimes I >

Re: How to get a field that starts with a minus?

2011-02-20 Thread Paul Tomblin
dfb1ef5f8719f65a7403e93cc9d > > query.setQuery("{!raw f=id}-3f66fdfb1ef5f8719f65a7403e93cc9d"); > > > > --- On Sun, 2/20/11, Paul Tomblin wrote: > >> From: Paul Tomblin >> Subject: How to get a field that starts with a minus? >> To: solr-user@lucene.apache.org

How to get a field that starts with a minus?

2011-02-20 Thread Paul Tomblin
I have a field in my database, "id", which is the unique key. The id is generated as an MD5 hash of some of the other data in the record, and unfortunately the way I converted it to hex meant that sometimes I get a negative value. I'm having a real hard time figuring out the right combination of

Re: Can't delete from curl

2010-03-09 Thread Paul Tomblin
On Mon, Mar 8, 2010 at 9:39 PM, Lance Norskog wrote: > ... curl http://xen1.xcski.com:8080/solrChunk/nutch/select > > that should be /update, not /select Ah, that seems to have fixed it. Thanks. -- http://www.linkedin.com/in/paultomblin http://careers.stackoverflow.com/ptomblin

Re: Can't delete from curl

2010-03-07 Thread Paul Tomblin
On Tue, Mar 2, 2010 at 1:22 AM, Lance Norskog wrote: > On Mon, Mar 1, 2010 at 4:02 PM, Paul Tomblin wrote: > > I have a schema with a field name "category" ( > type="string" stored="true" indexed="true"/>). I'm trying to dele

Can't delete from curl

2010-03-01 Thread Paul Tomblin
I have a schema with a field name "category" (). I'm trying to delete everything with a certain value of category with curl: I send: curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type: text/xml" --data-binary 'category:Banks' Response is: 023 I send curl http://localhost:8

Re: What does this error mean?

2009-11-27 Thread Paul Tomblin
m up at the same time. Do you use any warming > queries, or have large caches? > > Thanks for your time! > > Matthew Runo > Software Engineer, Zappos.com > mr...@zappos.com - 702-943-7833 > > On Nov 27, 2009, at 5:46 AM, Paul Tomblin wrote: > >> NFO: start >&

What does this error mean?

2009-11-27 Thread Paul Tomblin
NFO: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false) Nov 27, 2009 3:45:35 AM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {} 0 634 Nov 27, 2009 3:45:35 AM org.apache.solr.core.SolrCore getSearcher WARNING: [nutch] Error opening new searcher. e

Re: SolrJ looping until I get all the results

2009-11-02 Thread Paul Tomblin
On Mon, Nov 2, 2009 at 8:47 PM, Avlesh Singh wrote: >> >> I was doing it that way, but what I'm doing with the documents is do >> some manipulation and put the new classes into a different list. >> Because I basically have two times the number of documents in lists, >> I'm running out of memory.  

Re: SolrJ looping until I get all the results

2009-11-02 Thread Paul Tomblin
On Mon, Nov 2, 2009 at 8:40 PM, Avlesh Singh wrote: >> >> final static int MAX_ROWS = 100; >> int start = 0; >> query.setRows(MAX_ROWS); >> while (true) >> { >>   QueryResponse resp = solrChunkServer.query(query); >>   SolrDocumentList docs = resp.getResults(); >>   if (docs.size() == 0) >>     br

SolrJ looping until I get all the results

2009-11-02 Thread Paul Tomblin
If I want to do a query and only return X number of rows at a time, but I want to keep querying until I get all the row, how do I do that? Can I just keep advancing query.setStart(...) and then checking if server.query(query) returns any rows? Or is there a better way? Here's what I'm thinking

Another question about omitNorms

2009-10-31 Thread Paul Tomblin
In an earlier message, Yonik suggested that I use omitNorms="true" if I wanted the length of the document to not be counted in the scoring. The documentation also mentions that it omits "index-time boosting". What does that mean? -- http://www.linkedin.com/in/paultomblin http://careers.stackoverf

Re: Ok, that didn't work

2009-10-31 Thread Paul Tomblin
On Sat, Oct 31, 2009 at 11:08 AM, Yonik Seeley wrote: > I personally think it would be cleaner to allow a post of just a > (or multiple with a surrounding tag), esp now that we can put > modifiers in the URL. Exactly. The action should be in the url. > > For now, just use shell scripting I gue

Re: Ok, that didn't work

2009-10-31 Thread Paul Tomblin
> > -Yonik > http://www.lucidimagination.com > > > > On Sat, Oct 31, 2009 at 10:37 AM, Paul Tomblin wrote: >> I was looking at the script in example/exampledocs to feed documents >> to the server. >> >> Just to see if it was possible, I took one of the documents that I'v

Ok, that didn't work

2009-10-31 Thread Paul Tomblin
I was looking at the script in example/exampledocs to feed documents to the server. Just to see if it was possible, I took one of the documents that I've previously indexed using SolrJ, and I tried to feed it directly to the Solr server using the following command: curl http://localhost:8697/solr

Re: Scoring algorithm?

2009-10-31 Thread Paul Tomblin
:48 AM, Paul Tomblin wrote: >> Am I right in thinking that a document that the sortable field is only >> two sentences long and contains the search term once will score higher >> than one that is 50 sentences long that contains the search term 4 >> times? > > Yep.  Assu

Scoring algorithm?

2009-10-31 Thread Paul Tomblin
Am I right in thinking that a document that the sortable field is only two sentences long and contains the search term once will score higher than one that is 50 sentences long that contains the search term 4 times? Is there a way to change it to score higher based only on number of hits? -- ht

Re: How to access the information from SolrJ

2009-10-02 Thread Paul Tomblin
On Fri, Oct 2, 2009 at 5:04 PM, Shalin Shekhar Mangar wrote: > Can you try this with the Solrj client > in the official 1.3 release or even trunk? I did a svn update to 821188 and that seems to have fixed the problem. (The jar files changed from -1.3.0 to -1.4-dev) I guess it's been longer sinc

Re: How to access the information from SolrJ

2009-10-02 Thread Paul Tomblin
09 AM, Paul Tomblin <ptomb...@xcski.com> wrote: > >> > > Nope. Check again. getNumFound will definitely give you 1251. > > SolrDocumentList#size() will give you 10. > > I don't have to check again. I put this log into my query code: >Qu

Re: How to access the information from SolrJ

2009-10-02 Thread Paul Tomblin
On Fri, Oct 2, 2009 at 3:13 PM, Shalin Shekhar Mangar wrote: > On Fri, Oct 2, 2009 at 8:11 PM, Paul Tomblin wrote: > >> Nope, that just gets you the number of results returned, not how many >> there could be.  Like I said, if you look at the XML returned, you'll >>

Re: How to access the information from SolrJ

2009-10-02 Thread Paul Tomblin
tResults()#getNumFound() > > On Thu, Oct 1, 2009 at 11:49 PM, Paul Tomblin wrote: >> When I do a query directly form the web, the XML of the response >> includes how many results would have been returned if it hadn't >> restricted itself to the first 10 rows: &

How to access the information from SolrJ

2009-10-01 Thread Paul Tomblin
When I do a query directly form the web, the XML of the response includes how many results would have been returned if it hadn't restricted itself to the first 10 rows: For instance, the query: http://localhost:8080/solrChunk/nutch/select/?q=*:*&fq=category:mysites returns: 0 0 *:* category:mys

Correction: query.setRows

2009-10-01 Thread Paul Tomblin
Sorry, in my last question I meant setRows not setMaxRows.  Whay do I pass to setRows to get all matches, not just the first 10? -- Sent from my Palm Prē

What to set in query.setMaxRows()?

2009-10-01 Thread Paul Tomblin
Sorry about asking this here, but I can't reach wiki.apache.org right now. What do I set in query.setMaxRows() to get all the rows? -- http://www.linkedin.com/in/paultomblin

Re: Solr highlighting doesn't respect quotes

2009-09-24 Thread Paul Tomblin
On Thu, Sep 24, 2009 at 7:04 PM, Koji Sekiguchi wrote: > Set hl.usePhraseHighlighter parameter to true: > > http://wiki.apache.org/solr/HighlightingParameters#hl.usePhraseHighlighter > > That seems to have done it. Thanks. -- http://www.linkedin.com/in/paultomblin

Solr highlighting doesn't respect quotes

2009-09-24 Thread Paul Tomblin
If I do a query for a couple of words in quotes, Solr correctly only returns pages where those words appear exactly within the quotes. But the highlighting acts as if the words were given separately, and stems them and everything. For example, if I search for "knee pain", it returns a document th

Re: Highlighting in SolrJ?

2009-09-13 Thread Paul Tomblin
Thanks to Jay, I have my code doing what I need it to do. If anybody cares, this is my code: SolrQuery query = new SolrQuery(); query.setQuery(searchTerm); query.addFilterQuery(Chunk.SOLR_KEY_CONCEPT + ":" + concept); query.addFilterQuery(Chunk.SOLR_KEY_CATEGORY +

Re: Highlighting in SolrJ?

2009-09-11 Thread Paul Tomblin
w to set highlighting > params and how to get back a List of highlighting results. > > -Jay > http://www.lucidimagination.com > > > On Thu, Sep 10, 2009 at 5:40 PM, Paul Tomblin wrote: > >> If I set snippets to 9 and "mergeContinuous" to true, will I get &

Re: Highlighting in SolrJ?

2009-09-10 Thread Paul Tomblin
   List highightSnippets = > queryResponse.getHighlighting().get(id).get("content"); >      } >    } > > Hope that gets you what you need. > > -Jay > http://www.lucidimagination.com > > On Thu, Sep 10, 2009 at 3:19 PM, Paul Tomblin wrote: > >> Can s

Highlighting in SolrJ?

2009-09-10 Thread Paul Tomblin
Can somebody point me to some sample code for using highlighting in SolrJ? I understand the highlighted versions of the field comes in a separate NamedList? How does that work? -- http://www.linkedin.com/in/paultomblin

Re: Can't delete with a fq?

2009-09-09 Thread Paul Tomblin
On Wed, Sep 9, 2009 at 2:07 PM, AHMET ARSLAN wrote: > --- On Wed, 9/9/09, Paul Tomblin wrote: >> SEVERE: org.apache.lucene.queryParser.ParseException: >> Cannot parse >> 'url:http\:\/\/xcski\.com\/pharma\/&fq=category:pharma': > >> Should

Can't delete with a fq?

2009-09-09 Thread Paul Tomblin
I'm trying to delete using SolJ's "deleteByQuery", but it doesn't like it that I've added an "fq" parameter. Here's what I see in the logs: Sep 9, 2009 1:46:13 PM org.apache.solr.common.SolrException log SEVERE: org.apache.lucene.queryParser.ParseException: Cannot parse 'url:http\:\/\/xcski\.com\

Using scoring from another program

2009-09-03 Thread Paul Tomblin
Every document I put into Solr has a field "origScore" which is a floating point number between 0 and 1 that represents a score assigned by the program that generated the document. I would like it that when I do a query, it uses that origScore in the scoring, perhaps multiplying the Solr score to

Viewing xml in Safari

2009-09-02 Thread Paul Tomblin
Slightly off topic, but I'm getting tired of hitting the 'view source' keyboard shortcut every time I do a solr query.  Is there a way to make Safari display xml as-is? -- Sent from my Palm Prē

Multiple cores

2009-08-28 Thread Paul Tomblin
I'm trying to instantiate multiple cores. Since nothing is different between the two cores except the schema and the data dir, I was hoping to share the same instanceDir. Solr seems to recognize that there are two cores, and gives me two different admin pages. But unfortunately both the admin pa

Re: Solr Wiki Page Not Responding. Is it down?

2009-08-28 Thread Paul Tomblin
On Fri, Aug 28, 2009 at 1:12 PM, Israel Ekpo wrote: > Is the Solr wiki down? > There's a very useful web page for these questions: http://downforeveryoneorjustme.com/ It confirms that yes, the wiki is down. I'm currently using the Google cache to read the pages I need. -- http://www.linkedin.

Re: Why isn't this working?

2009-08-28 Thread Paul Tomblin
On Thu, Aug 27, 2009 at 11:36 PM, Ryan McKinley wrote: > Say you have an embedded solr server and an http solr server pointed to the > same location. > 1.  make sure only is read only!  otherwise you can make a mess. > 2. calling commit on the embedded solr instance, will not have any effect on > t

Re: Ok, why isn't this working?

2009-08-28 Thread Paul Tomblin
On Fri, Aug 28, 2009 at 8:04 AM, Chantal Ackermann wrote: > Paul Tomblin schrieb: >> The conf file says: >>  ${solr.data.dir:./solr/data} >> That indicates to me that there is some way to override that default >> ./solr/data involving something called solr.data.dir, bu

Re: Ok, why isn't this working?

2009-08-28 Thread Paul Tomblin
On Fri, Aug 28, 2009 at 6:42 AM, Shalin Shekhar Mangar wrote: >> Ok, I've spotted the problem - while SolrHome is in the right place, >> it's still looking for the data in >> /Users/ptomblin/apache-tomcat-6.0.20/solr/data/ >> >> How can I changed that? >> >> > One easy way is to hard code that loca

Why isn't this working?

2009-08-27 Thread Paul Tomblin
Yesterday or the day before, I asked specifically if I would need to restart the Solr server if somebody else loaded data into the Solr index using the EmbeddedServer, and I was told confidently that no, the Solr server would see the new data as soon as it was committed. So today I fired up the Sol

Re: Ok, why isn't this working?

2009-08-27 Thread Paul Tomblin
On Thu, Aug 27, 2009 at 9:24 PM, Paul Tomblin wrote: >>cwd=/Users/ptomblin/apache-tomcat-6.0.20 >>SolrHome=/Users/ptomblin/src/lucidity/solr/ > Ok, I've spotted the problem - while SolrHome is in the right place, it's still looking for the data in /Users/ptomblin/apach

Ok, why isn't this working?

2009-08-27 Thread Paul Tomblin
I've loaded some data into my solr using the embedded server, and I can see the data using Luke. I start up the web app, and it says >cwd=/Users/ptomblin/apache-tomcat-6.0.20 >SolrHome=/Users/ptomblin/src/lucidity/solr/ I hit the "schema" button and it shows the correct schema. However, if I t

Can solr do the equivalent of "select distinct(field)"?

2009-08-27 Thread Paul Tomblin
Can I get all the distinct values from the Solr "database", or do I have to select everything and aggregate it myself? -- http://www.linkedin.com/in/paultomblin

Re: Updating a solr record

2009-08-27 Thread Paul Tomblin
On Thu, Aug 27, 2009 at 1:27 PM, Eric Pugh wrote: > You can just query Solr, find the records that you want (including all > the website data).  Update them, and then send the entire record back. > Correct me if I'm wrong, but I think you'd end up losing the fields that are indexed but not stored.

SolrJ and Solr web simultaneously?

2009-08-26 Thread Paul Tomblin
Is Solr like a RDBMS in that I can have multiple programs querying and updating the index at once, and everybody else will see the updates after a commit, or do I have to something explicit to see others updates? Does it matter whether they're using the web interface, SolrJ with a CommonsHttpSolrS

Re: Wildcard seaches?

2009-08-20 Thread Paul Tomblin
On Thu, Aug 20, 2009 at 10:51 AM, Andrew Clegg wrote: > Paul Tomblin wrote: >> >> Is there such a thing as a wildcard search?  If I have a simple >> solr.StrField with no analyzer defined, can I query for "foo*" or >> "foo.*" and get everyth

Wildcard seaches?

2009-08-20 Thread Paul Tomblin
Is there such a thing as a wildcard search? If I have a simple solr.StrField with no analyzer defined, can I query for "foo*" or "foo.*" and get everything that starts with "foo" such as 'foobar" and "foobaz"? -- http://www.linkedin.com/in/paultomblin

Re: Shutdown Solr

2009-08-19 Thread Paul Tomblin
On Wed, Aug 19, 2009 at 2:43 PM, Fuad Efendi wrote: > Most probably Ctrl-C is graceful for Tomcat, and kill -9 too... Tomcat is > smart... I prefer "/etc/init.d/my_tomcat" wrapper around catalina.sh ("su > tomcat", /var/lock etc...) - ok then, Graceful Shutdown depends on how you > started Tomcat.

Re: Can I search for a term in any field or a list of fields?

2009-08-18 Thread Paul Tomblin
On Tue, Aug 18, 2009 at 11:04 AM, Marco Westermann wrote: > exactly! for example you could create a field called "all". And you copy > your fields to it, which should be searched, when all fields are searched. > Awesome, that worked great. I made my "all" field 'stored="false" indexed="true"' and

Re: Can I search for a term in any field or a list of fields?

2009-08-18 Thread Paul Tomblin
So if I want to make it so that the default search always searches three specific fields, I can make another field multi-valued that they are all copied into? On Tue, Aug 18, 2009 at 10:46 AM, Marco Westermann wrote: > I would say, you should use the copyField tag in the schema. eg: > > > > the t

Can I search for a term in any field or a list of fields?

2009-08-18 Thread Paul Tomblin
I've got "text" and so if I do an unqualified search it only finds in the field text. If I want to search title, I can do "title:foo", but what if I want to find if the search term is in any field, or if it's in "text" or "title" or "concept" or "keywords"? I already tried "*:foo", but that throw

Re: SolrJ question

2009-08-17 Thread Paul Tomblin
On Mon, Aug 17, 2009 at 5:47 PM, Paul Tomblin wrote: > Hmmm.  It's not working right.  I've added a 5 documents, 3 with the > URL set to "http://xcski.com/pharma/"; and 2 with the URL set to > "http://xcski.com/nano/";.  Doing other sorts of queries seems to

Re: SolrJ question

2009-08-17 Thread Paul Tomblin
On Mon, Aug 17, 2009 at 5:36 PM, Ensdorf Ken wrote: >> Does this mean I should have converted my objects to string before >> writing them to the server? >> > > I believe SolrJ takes care of that for you by calling toString(), but you > would need to convert explicitly when you query (and then esca

Re: SolrJ question

2009-08-17 Thread Paul Tomblin
On Mon, Aug 17, 2009 at 5:30 PM, Ensdorf Ken wrote: > You can escape the string with > > org.apache.lucene.queryParser.QueryParser.escape(String query) > > http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/queryParser/QueryParser.html#escape%28java.lang.String%29 > Does this mean I should

Re: SolrJ question

2009-08-17 Thread Paul Tomblin
On Mon, Aug 17, 2009 at 5:28 PM, Harsch, Timothy J. (ARC-SC)[PEROT SYSTEMS] wrote: > Assuming you have written the SolrInputDocument to the server, you would next > query. I'm sorry, I don't understand what you mean by "you would next query." There appear to be some words missing from that sente

SolrJ question

2009-08-17 Thread Paul Tomblin
If I put an object into a SolrInputDocument and store it, how do I query for it back? For instance, I stored a java.net.URI in a field called "url", and I want to query for all the documents that match a particular URI. The query syntax only seems to allow Strings, and if I just try query.setQuer

Which versions?

2009-08-16 Thread Paul Tomblin
Which versions of Lucene, Nutch and Solr work together? I've discovered that the Nutch trunk and the Solr trunk use wildly different versions of the Lucene jars, and it's causing me problems. -- http://www.linkedin.com/in/paultomblin

I think this is a "bug"

2009-08-13 Thread Paul Tomblin
I don't want to join yet another mailing list or register for JIRA, but I just noticed that the Javadocs for SolrInputDocument.addField(String name, Object value, float boost) is incredibly wrong - it looks like it was copied from a "deleteAll" method. -- http://www.linkedin.com/in/paultomblin