Sorting on multivalues field in Solr

2015-05-12 Thread nutchsolruser
Is there any way we can sort multivalued field in Solr. I have two documents with field custom_code and values are as below, Doc 1 : 11, 78, 45, 22 Doc 2 : 56, 74, 62, 10 When I sort it in ascending order the order should be , Doc 2 : 56, 74, 62, 10 Doc 1 : 11, 78, 45, 22 Here Doc 2 will come

Re: SOLR 4.10.4 - error creating document

2015-05-12 Thread Bernd Fehling
Hi Erik, thanks for your concerns and thoughts. There is no XY problem because we decouple input (storing) from, searching, faceting, ... What you see is just the input for storing and output of the original text in the results. There is no need to do any analysis on this. So don't worry, it

Re: Sorting on multivalues field in Solr

2015-05-12 Thread Alexandre Rafalovitch
The easiest way is to have a separate field for sorting. Make it DocValue as well for faster sorting performance. Then, you have an Update Request Processor (URP) chain and in it you clone the field and choose the most appropriate value (smallest). There are URPs for that, e.g.

Transactional Behavior

2015-05-12 Thread Amr Ali
Hello, I have a business case in which I need to be able for the rollback. When I tried add/commit I was not able to prevent other threads that write to a given Solr core from committing everything. I also tried indexwriter but Solr did not get changes until we restart it. -- Regards, Amr

Re: SolrCloud indexing

2015-05-12 Thread Bill Au
Thanks for the reply. Actually in our case we want the timestamp to be populated locally on each node in the SolrCloud cluster. We want to see if there is any delay in the document being distributed within the cluster. Just want to confirm that the timestamp can be use for that purpose. Bill

Re: How is the most relevant document of each group chosen when group.truncate is used?

2015-05-12 Thread Andrii Berezhynskyi
Forgot to mention that I'm using solr 5.0

JARs needed to run SolrJ

2015-05-12 Thread Steven White
Hi Everyone, I am trying to use SolrJ to add docs to Solr. The following line: HttpSolrClient solrServer = new HttpSolrClient( http://localhost:8983/solr;); Is failing with exception: Exception in thread main java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory at

Re: SolrJ vs. plain old HTTP post

2015-05-12 Thread Steven White
Thanks Shalin and all for helping with this question. It is much appreciated. Steve On Tue, May 12, 2015 at 1:24 AM, Shalin Shekhar Mangar shalinman...@gmail.com wrote: On Mon, May 11, 2015 at 8:20 PM, Steven White swhite4...@gmail.com wrote: Thanks Erik and Emir. snip/ To close

RE: Retrieving list of synonyms and facet field values

2015-05-12 Thread Siamak Rowshan
Thanks Alessandro, managed resources was exactly what I needed. -Original Message- From: Alessandro Benedetti [mailto:benedetti.ale...@gmail.com] Sent: Tuesday, May 12, 2015 10:12 AM To: solr-user@lucene.apache.org Subject: Re: Retrieving list of synonyms and facet field values Hi

RE: Trying to get AnalyzingInfixSuggester to work in Solr?

2015-05-12 Thread Reitzel, Charles
Fwiw, we ended up preferring the 4.x spellcheck approach. For starters, it is supported by SolrJ ... :-) But more importantly, we wanted a mix of both terms and field values in our suggestions. We found the Suggester component doesn't do that. We also weren't interested in matching in the

Re: JARs needed to run SolrJ

2015-05-12 Thread Emir Arnautovic
Hi Steve, You can find list of dependencies in its pom: http://central.maven.org/maven2/org/apache/solr/solr-solrj/5.1.0/solr-solrj-5.1.0.pom It would be best if you use some dependency management tool. You can use it in separate project to create all-in-one jar and than include that one in

Re: JARs needed to run SolrJ

2015-05-12 Thread Shawn Heisey
On 5/12/2015 12:33 PM, Steven White wrote: Hi Everyone, I am trying to use SolrJ to add docs to Solr. The following line: HttpSolrClient solrServer = new HttpSolrClient( http://localhost:8983/solr;); Is failing with exception: Exception in thread main

Re: Transactional Behavior

2015-05-12 Thread Jack Krupansky
Solr does have a rollback/ command, but it is an expert feature and not so clear how it works in SolrCloud. See: https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers and https://wiki.apache.org/solr/UpdateXmlMessages#A.22rollback.22 -- Jack Krupansky On Tue, May

Re: Transactional Behavior

2015-05-12 Thread Emir Arnautovic
Hi Amr, One option is to include transaction id in your documents and do delete in case of failed transaction. It is not cheap option - additional field if you don't have something to use to identify transaction. Assuming rollback will not happen to often deleting is not that big issue.

Re: Why are these two queries different?

2015-05-12 Thread Frank li
Thanks for your help. I figured it out. Just as you said. Appreciate your help. Somehow forgot to reply your post. On Wed, Apr 29, 2015 at 9:24 AM, Chris Hostetter hossman_luc...@fucit.org wrote: : We did two SOLR qeries and they supposed to return the same results but : did not: the short

RE: Transactional Behavior

2015-05-12 Thread Amr Ali
Please check this https://lucene.apache.org/solr/4_1_0/solr-solrj/org/apache/solr/client/solrj/SolrServer.html#rollback() Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a

How is the most relevant document of each group chosen when group.truncate is used?

2015-05-12 Thread Andrii Berezhynskyi
Hi all, When I use group.truncate and filtering I'm getting strange faceting results. If I use just grouping without filtering: group=truegroup.field=parent_skugroup.ngroups=truegroup.truncate=truefacet=truefacet.field=color, then I get: facet_fields: { color: [ white, 19742, 19742 white

Re: schema modification issue

2015-05-12 Thread Ziloo Zolr
Hi Steve, Thanks for paying attention to this. Here is the JIRA issue I reported: https://issues.apache.org/jira/browse/SOLR-7536. Sorry for any inconvenience caused by my unfamiliarness with JIRA. 2015-05-12 0:22 GMT+08:00 Steve Rowe sar...@gmail.com: Hi, Thanks for reporting, I’m working

Re: Solr Multilingual Indexing with one field- Guidance

2015-05-12 Thread TK Solr
On 5/7/15, 11:23 AM, Kuntal Ganguly wrote: 1) Is this a correct approach to do it? Or i'm missing something? Does the user wants to see the documents that he/she doesn't understand? The words such as doctor, taxi, etc. are common among many languages in Europe. Would the Spanish user wants to

scoreMode ToParentBlockJoinQuery

2015-05-12 Thread StrW_dev
Hi Is it possible to configure the scoreMode of the Parent block join query parser (ToParentBlockJoinQuery)? It seems it's set to none, while i would require max in this case. What I want is to filter on child documents, but still use the relevance/boost of these child documents in the final

Creating a new collection via solrj

2015-05-12 Thread Sznajder ForMailingList
Hi, I would like to create programmatically a new collection with a given Schema (the schema.xml file is in my java project under a folder configuration/, for example) However, I did not find a solrj example describing these steps. If one of you could help.. thanks! Benjamin

Beginner problems with solr.ICUCollationField

2015-05-12 Thread Björn Keil
Hello, I am trying to understand solr 5.1 (trying to overcome some problems I have with solr 3.6) by experimenting with the distributed package, but I am having problems using a solr.ICUCollationField field. Trying to create the collection using bin/create_collection aborts, because it says it

Re: Creating a new collection via solrj

2015-05-12 Thread Erick Erickson
See the CollectionAdminRequest.createCollection etc. Best, Erick On Tue, May 12, 2015 at 3:53 AM, Sznajder ForMailingList bs4mailingl...@gmail.com wrote: Hi, I would like to create programmatically a new collection with a given Schema (the schema.xml file is in my java project under a

utility methods to get field values from index

2015-05-12 Thread Parvesh Garg
Hi All, Was wondering if there is any class in Solr that provides utility methods to fetch indexed field values for documents using docId. Something simple like getMultiLong(String field, int docId) getLong(String field, int docId) We have written a solr component to return group level stats

Re: Retrieving list of synonyms and facet field values

2015-05-12 Thread Alessandro Benedetti
Hi Siamak, 1) You can do that with the managed resources : Take a look to the synonym section. https://cwiki.apache.org/confluence/display/solr/Managed+Resources Specifically : To determine the synonyms for a specific term, you send a GET request for the child resource, such as

Re: Sorting on multivalues field in Solr

2015-05-12 Thread Nutch Solr User
Thanks Alex that was really useful. - Nutch Solr User The ultimate search engine would basically understand everything in the world, and it would always give you the right thing. -- View this message in context:

Retrieving list of synonyms and facet field values

2015-05-12 Thread Siamak Rowshan
Hi all, I'm new to Solr and would appreciate any help with this question. Is there a way, to retrieve the list of synonyms via the API? I also need to retrieve the values of each facet field via API. For example the list of Cat facet includes: fiction, non-fiction, etc. Thanks, Siamak

Re: scoreMode ToParentBlockJoinQuery

2015-05-12 Thread Alessandro Benedetti
Hi , One year ago or something, it was not possible to have in Solr the results of the Join sorted ( it was not using the lucene sorting) . In solr it was only a filter query with no scoring. I should verify if we are currently in the same scenario. For sure it should not be a big deal to port the

Re: Beginner problems with solr.ICUCollationField

2015-05-12 Thread Shawn Heisey
On 5/12/2015 7:03 AM, Björn Keil wrote: Well, that's a bid odd in so far as there is no SOLR_HOME/lib directory. When I start solr with the verbose flag it says: SOLR_HOME = (...)/solr-5.1.0/server/solr However, what I did is first symlink and then copy the respective libraries to

Re: scoreMode ToParentBlockJoinQuery

2015-05-12 Thread StrW_dev
I actually did some digging and changed the default ScoreMode in the source code, which actually allowed me to do what I want. So now I use the parent block join query which propogates the score. With the new child transformer for the return field I can even get the child info in the result :).

Re: scoreMode ToParentBlockJoinQuery

2015-05-12 Thread Alessandro Benedetti
So , have you customised your Solr with a plugin ? Do you have additional info or documentation ? What is the new child transformer ? I never used it ! Cheers 2015-05-12 16:12 GMT+01:00 StrW_dev r.j.bamb...@structweb.nl: I actually did some digging and changed the default ScoreMode in the