RE: newbie question

2016-09-07 Thread Gonzalo Rodriguez
Hi Darshan,

It looks like you are listing the instanceDir's name twice in the create 
collection command, it should be

$ solrctl --zk  host:2181/solr --solr host:8983/solr/ collection --create 
Catalog_search_index -s 10 -c Catalog_search_index

Without the extra ". Catalog_search_index" at the end. Also, because your new 
collection's name is the same as the instanceDir's, you could just omit that 
parameter and it should work ok.

Try that and see if it works.

Good luck,
Gonzalo

-Original Message-
From: Darshan Pandya [mailto:darshanpan...@gmail.com] 
Sent: Wednesday, September 7, 2016 12:02 PM
To: solr-user@lucene.apache.org
Subject: newbie question

hello,

I am using solr cloud with cloudera. When I try to create a collection, it 
fails with the following error.
Any hints / answers will be helpful.


$ solrctl --zk  host:2181/solr instancedir --list

Catalog_search_index

$ solrctl --zk  shot:2181/solr --solr host:8983/solr/ collection --create 
Catalog_search_index -s 10 -c Catalog_search_index.Catalog_search_index

Error: A call to SolrCloud WEB APIs failed: HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Type: application/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Wed, 07 Sep 2016 17:58:13 GMT












0



1165







org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error
CREATEing SolrCore 'Catalog_search_index_shard1_replica1': Unable to create 
core [Catalog_search_index_shard1_replica1] Caused by: Specified config does 
not exist in ZooKeeper:Catalog_search_index.dataCatalog_search_index


--
Sincerely,
Darshan


RE: variaton on boosting recent documents gives exception

2015-02-13 Thread Gonzalo Rodriguez
Hello Michael,

You can always change the type of your sortyear field to an int, or create an 
int version of it and use copyField to populate it.

And using NOW/YEAR will round the current date to the start of the year, you 
can read more about this in the Javadoc: 
http://lucene.apache.org/solr/4_10_3/solr-core/org/apache/solr/util/DateMathParser.html

You can test it using the example collection: 
http://localhost:8983/solr/collection1/select?q=*:*boost=recip(ms(NOW/YEAR,manufacturedate_dt),3.16e-11,1,1)fl=id,manufacturedate_dt,score,[explain]defType=edismax
 and checking the explain field for the numeric value given to NOW/YEAR vs 
NOW/HOUR, etc.


Gonzalo

-Original Message-
From: Michael Lackhoff [mailto:mich...@lackhoff.de] 
Sent: Thursday, February 12, 2015 8:57 AM
To: solr-user@lucene.apache.org
Subject: variaton on boosting recent documents gives exception

Since my field to measure recency is not a date field but a string field (with 
only year-numbers in it), I tried a variation on the suggested boost function 
for recent documents:
  recip(sub(2015,min(sortyear,2015)),1,10,10)
But this gives an exception when used in a boost or bf parameter.
I guess the reason is that all the mathematics doesn't work with a string field 
even if it only contains numbers. Am I right with this guess? And if so, is 
there a function I can use to change the type to something numeric? Or are 
there other problems with my function?

Another related question: as you can see the current year (2015) is hard coded. 
Is there an easy way to get the current year within the function?
Messing around with NOW looks very complicated.

-Michael


RE: Find duplicates

2014-12-02 Thread Gonzalo Rodriguez
Have you tried using result grouping for your query? There are some very good 
examples in the wiki:

https://wiki.apache.org/solr/FieldCollapsing


Gonzalo

-Original Message-
From: Peter Kirk [mailto:p...@alpha-solutions.dk] 
Sent: Tuesday, December 02, 2014 9:58 AM
To: solr-user@lucene.apache.org
Subject: Find duplicates

Hi

Is it possible to formulate a Solr query which finds all documents which have 
the same value in a particular field?
Note, I don't know what the value is, I just want to find all documents with 
duplicate values.

For example, I have 5 documents:

Doc1: field Name = Peter
Doc2: field Name = Jack
Doc3: field Name = Peter
Doc4: field Name = Paul
Doc5: field Name = Jack


If I executed the query, it would find documents Doc1 and Doc3 (Peter is the 
same), and Doc2 and Doc5 (Jack is the same).



Thanks,
Peter


RE: Help on Notification for SOLR

2014-11-24 Thread Gonzalo Rodriguez
Hi,

You might want to take a look at the UpdateRequestProcessor and 
UpdateRequestProcessorChain classes:

https://wiki.apache.org/solr/UpdateRequestProcessor and 
http://lucene.apache.org/solr/4_10_2/solr-core/org/apache/solr/update/processor/UpdateRequestProcessorChain.html

You can hook a chain to your update request handler and use a 
ScriptUpdateProcessor to implement your notification system.

https://wiki.apache.org/solr/ScriptUpdateProcessor

Hope this helps,
Gonzalo

-Original Message-
From: EXTERNAL Taminidi Ravi (ETI, Automotive-Service-Solutions) 
[mailto:external.ravi.tamin...@us.bosch.com] 
Sent: Monday, November 24, 2014 2:35 PM
To: solr-user@lucene.apache.org
Subject: Help on Notification for SOLR

Hello,  

I am working on implementing a notification system when there is any change in 
the solr index (Addition or removal of documents from Index).

Can someone guide me on the starting point. I see some articles using DIH? Is 
there any way using without DIH.

Thanks

Ravi