Re: Solr Silently failing when I want a loud complaint.
On 3/22/07, Jamie Orchard-Hays <[EMAIL PROTECTED]> wrote: Ok, I looked at the source and see that it returns true or false on an add/update. That definitely helps. I guess I'm surprised that in the Solr console I don't see any error messages like "Hey idiot, you haven't defined that field in your schema.xml, so I can't index the document!" I totally agree... i also spent a lot of time tracking this down. If you are using: apache-solr-1.2-dev.jar You can add: to solrconfig.xml. Then you will get proper response codes and the exceptions will be logged. ryan
Re: Solr Silently failing when I want a loud complaint.
Ok, I looked at the source and see that it returns true or false on an add/update. That definitely helps. I guess I'm surprised that in the Solr console I don't see any error messages like "Hey idiot, you haven't defined that field in your schema.xml, so I can't index the document!" :-) Jamie On 3/22/07, Ryan McKinley <[EMAIL PROTECTED]> wrote: the current /update stuff always returns a 200 response code - if there is an error, it is in the text and you have to parse it. Is this the problem? Or is something else happening? The update handler framework returns proper error codes so they are much easier to check for... In general I think solr needs to get louder and more clear with the error messages: http://issues.apache.org/jira/browse/SOLR-179 ryan On 3/22/07, Jamie Orchard-Hays <[EMAIL PROTECTED]> wrote: > I've run into this problem a couple of times. I'm indexing some data, > but I've inadvertently added a field that my schema doesn't define. > Everything seems to process fine, Solr doesn't complain, and then I > spend time trying to figure out what's going on b/c I haven't realized > my error. I've done this twice in the past few weeks now, costing me a > few hours where a thrown error would have cost me only a few minutes. > > Is this a known issue? I'm using a nightly build from a couple of weeks ago. > > Thanks, > > Jamie >
Re: Solr Silently failing when I want a loud complaint.
the current /update stuff always returns a 200 response code - if there is an error, it is in the text and you have to parse it. Is this the problem? Or is something else happening? The update handler framework returns proper error codes so they are much easier to check for... In general I think solr needs to get louder and more clear with the error messages: http://issues.apache.org/jira/browse/SOLR-179 ryan On 3/22/07, Jamie Orchard-Hays <[EMAIL PROTECTED]> wrote: I've run into this problem a couple of times. I'm indexing some data, but I've inadvertently added a field that my schema doesn't define. Everything seems to process fine, Solr doesn't complain, and then I spend time trying to figure out what's going on b/c I haven't realized my error. I've done this twice in the past few weeks now, costing me a few hours where a thrown error would have cost me only a few minutes. Is this a known issue? I'm using a nightly build from a couple of weeks ago. Thanks, Jamie
Solr Silently failing when I want a loud complaint.
I've run into this problem a couple of times. I'm indexing some data, but I've inadvertently added a field that my schema doesn't define. Everything seems to process fine, Solr doesn't complain, and then I spend time trying to figure out what's going on b/c I haven't realized my error. I've done this twice in the past few weeks now, costing me a few hours where a thrown error would have cost me only a few minutes. Is this a known issue? I'm using a nightly build from a couple of weeks ago. Thanks, Jamie
Re: [jira] Commented: (SOLR-20) A simple Java client for updating and searching
On 3/22/07, Thierry Collogne (JIRA) <[EMAIL PROTECTED]> wrote: I think that is all. If I forgot something, post it here. One remark. The setHighlightSurroundingTags method can only take simple tags, no tags containing quotes or such. Out of curiosity, why is this? Solr should be able to handle it. -Mike
[jira] Commented: (SOLR-124) use NewIndexModifier, LUCENE-565
[ https://issues.apache.org/jira/browse/SOLR-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483194 ] Tim Patton commented on SOLR-124: - Which package protected parts of lucene would need to be accessed? Perhaps a patch to lucene could be submitted to support dleete by query (or at least all easy support of delete by query). > use NewIndexModifier, LUCENE-565 > > > Key: SOLR-124 > URL: https://issues.apache.org/jira/browse/SOLR-124 > Project: Solr > Issue Type: Improvement > Components: update >Reporter: Yonik Seeley > > LUCENE-565 adds extension points to the IndexWriter, and adds delete-by-term > functionality. > We should probably take advantage of this (when available) in our > UpdateHandler (a new one, or modify DU2?) > and perhaps implement a more efficient deleteByQuery. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-20) A simple Java client for updating and searching
[ https://issues.apache.org/jira/browse/SOLR-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483051 ] Thierry Collogne commented on SOLR-20: -- I found that there was no way of adding highlight paramters to an SolrQuery, so I made some modifications to SolrQuery.java and ParamNames.java to allow highlighting Changes to SolrQuery First add a new variable private HighlightParams _highlight = new HighlightParams(); Than I defined a new innerclass (a bit like FacetParams) public static class HighlightParams { public List field = new ArrayList(); public int snippets = 3; public int fragsize = 100; public String simple_pre = ""; public String simple_post = ""; public boolean isEnabled() { return field.size() > 0; } } Than add the following methods public void addHighlightField( String f ) { _highlight.field.add( f ); } public void setHighlightSnippets( int snippets ) { _highlight.snippets = snippets; } public void setHighlightFragSize( int fragsize ) { _highlight.fragsize = fragsize; } // ATTENTION : only simple tags. No quotes like in public void setHighlightSurroundingTags( String pre, String post ) { _highlight.simple_pre = pre; _highlight.simple_post = post; } Add the following code to getQueryString method (for example right before return builder.toString();) if( _highlight.isEnabled() ) { builder.append( '&' ).append( ParamNames.HIGHLIGHT ).append( "=true" ); builder.append( '&' ).append( ParamNames.HIGHLIGHT_FIELDS ).append( "=" ); for( String f : _highlight.field ) { builder.append( f ).append( ',' ); } builder.append( '&' ).append( ParamNames.HIGHLIGHT_SNIPPETS ).append( "=" ).append( _highlight.snippets ); builder.append( '&' ).append( ParamNames.HIGHLIGHT_FRAGSIZE ).append( "=" ).append( _highlight.fragsize ); builder.append( '&' ).append( ParamNames.HIGHLIGHT_SIMPLE_PRE ).append( "=" ).append( _highlight.simple_pre ); builder.append( '&' ).append( ParamNames.HIGHLIGHT_SIMPLE_POST ).append( "=" ).append( _highlight.simple_post ); } Changes to ParamNames.java Add/modify the following variables /** wether to highlight */ public static final String HIGHLIGHT = "hl"; /** fields to highlight */ public static final String HIGHLIGHT_FIELDS = "hl.fl"; /** maximum highlight fragments to return */ public static final String HIGHLIGHT_SNIPPETS = "hl.snippets"; /** override default highlight fragsize */ public static final String HIGHLIGHT_FRAGSIZE = "hl.fragsize"; /** override default pre highlight */ public static final String HIGHLIGHT_SIMPLE_PRE = "hl.simple.pre"; /** override default post highlight */ public static final String HIGHLIGHT_SIMPLE_POST = "hl.simple.post"; This can be used as follwed SolrClient client = new SolrClientImpl( new URL("http://localhost:8080/solr/";) ); // required query.addHighlightField("title"); query.addHighlightField("content"); // following is optional query.setHighlightFragSize(100); query.setHighlightSnippets(3); query.setHighlightSurroundingTags("",""); I think that is all. If I forgot something, post it here. One remark. The setHighlightSurroundingTags method can only take simple tags, no tags containing quotes or such. Greetz. > A simple Java client for updating and searching > --- > > Key: SOLR-20 > URL: https://issues.apache.org/jira/browse/SOLR-20 > Project: Solr > Issue Type: New Feature > Components: clients - java > Environment: all >Reporter: Darren Erik Vengroff >Priority: Minor > Attachments: DocumentManagerClient.java, DocumentManagerClient.java, > solr-client-java-2.zip.zip, solr-client-java.zip, solr-client-sources.jar, > solr-client.zip, solr-client.zip, solr-client.zip, SolrClientException.java, > SolrServerException.java > > > I wrote a simple little client class that can connect to a Solr server and > issue add, delete, commit and optimize commands using Java methods. I'm > posting here for review and comments as suggested by Yonik. -- This message is automatically generated by JIRA. - You can