Re: [nesting] JSON Facet API vs. BlockJoin Faceting: need help on queries (Facet API facets by wrong doc level VS. BlockJoin Faceting does not return top 10 most frequent)

2016-03-28 Thread Alisa Z .
 Ok, so for the 1st question, I think I'm getting closer:  adding  facet: 
{top_terms_by_doc: "unique(_root_)"}  as indicated in  
http://blog.griddynamics.com/search/label/~Mikhail%20Khludnev returns correct 
counts. However, sorting is done by the upper faceting not by the 
unique(_root_):  


curl  http://localhost:8985/solr/my_collection /query -d 
'q={!parent%20which="type_s:doc"}type_s:doc.userData%20%2BSubject_t:california=0&
json.facet={
  filter_by_child_type :{
    type:query,
    q:"type_s:doc.enriched.text.keywords",
    domain: { blockChildren : "type_s:doc" },
    facet:{
  top_keywords_text : {
    type: terms,
    field: text_t,
    limit: 10,
    facet: {
   top_terms_by_doc: "unique(_root_)"
 }
  }
    }
  }
}'

RETURNS 

{
  "responseHeader":{
    "status":0,
    "QTime":25,
    "params":{
  "q":"{!parent which=\"type_s:doc\"}type_s:doc.userData 
+Subject_t:california",
  "json.facet":"{\n  filter_by_child_type :{\n    type:query,\n    
q:\"type_s:doc.enriched.text.keywords\",\n    domain: { blockChildren : 
\"type_s:doc\" },\n    facet:{\n  top_keywords_text : {\n    type: 
terms,\n    field: text_t,\n    limit: 10,\n    facet: {\n  
 top_terms_by_doc: \"unique(_root_)\"\n }\n  }\n    }\n  }\n}",
  "rows":"0"}},
  "response":{"numFound":19,"start":0,"docs":[]
  },
  "facets":{
    "count":19,
    "filter_by_child_type":{
  "count":686,
  "top_keywords_text":{
    "buckets":[{
    "val":"enron",
    "count":57,
    "top_terms_by_doc":9},
  {
    "val":"california",
    "count":22,
    "top_terms_by_doc":13},
  {
    "val":"power",
    "count":21,
    "top_terms_by_doc":7},
  {
    "val":"rate",
    "count":15,
    "top_terms_by_doc":5},
  {
    "val":"plan",
    "count":13,
    "top_terms_by_doc":3},
  {
    "val":"hou",
    "count":12,
    "top_terms_by_doc":5},
  {
    "val":"energy",
    "count":11,
    "top_terms_by_doc":5},
  {
    "val":"na",
    "count":11,
    "top_terms_by_doc":5},
  {
    "val":"mckinsey",
    "count":10,
    "top_terms_by_doc":1},
  {
    "val":"socal",
    "count":10,
    "top_terms_by_doc":4}]

Nice, but I want them to be ordered by "top_terms_by_doc" frequencies,  not by 
the "count" frequencies. 
Any suggestions?

Thanks,
Alisa 





>Понедельник, 28 марта 2016, 15:39 -04:00 от Alisa Z. :
>
>Hi all, 
>
>I am trying to perform faceting of parent docs by nested document fields. I've 
>tried 2 approaches as in subject, yet in first the results are not quite 
>correct and in the 2nd I cannot get the query right. So I need help on either 
>of them and any explication or documentation or blogs on the behavior is much 
>appreciated.   
>
>Verbally the query is as follows: "Find top 10 keywords for all documents with 
>"california" in email subject line"
>
>Here is the query with responses: 
>
> Json Facet API   
>
>curl http://localhost:8985/solr/my_collection/query -d 
>'q={!parent%20which="type_s:doc"}type_s:doc.userData%20%2BSubject_t:california=0&
>json.facet={
>  filter_by_child_type :{
>    type:query,
>    q:"type_s:doc.enriched.text.keywords",
>    domain: { blockChildren : "type_s:doc" },
>    facet:{
>  top_keywords_text : {
>    type: terms,
>    field: text_t,
>    limit: 10
>  }
>    }
>  }
>}'
>
>RETURNS:  
>
>{
>  "responseHeader":{
>    "status":0,
>    "QTime":134,
>    "params":{
>  "q":"{!parent which=\"type_s:doc\"}type_s:doc.userData 
>+Subject_t:california",
>  "json.facet":"{\n  filter_by_child_type :{\n    type:query,\n    
>q:\"type_s:doc.enriched.text.keywords\",\n    domain: { blockChildren : 
>\"type_s:doc\" },\n    facet:{\n  top_keywords_text : {\n    type: 
>terms,\n    field: text_t,\n    limit: 10\n  }\n    }\n  }\n}",
>  "rows":"0"}},
>  "response":{"numFound":19,"start":0,"docs":[]
>  },
>  "facets":{
>    "count":19,
>    "filter_by_child_type":{
>  "count":686,
>  "top_keywords_text":{
>    "buckets":[{
>    "val":"enron",
>    "count":57},
>  {
>    "val":"california",
>    "count":22},
>  {
>    "val":"power",
>    "count":21},
>  {
>    "val":"rate",
>    "count":15},
>  {
>    "val":"plan",
>    "count":13},
>  {
>    "val":"hou",
>    "count":12},
>  {
>    "val":"energy",
>    "count":11},
>  {
>    "val":"na",
>    "count":11},
>  {
>    "val":"mckinsey",
>    "count":10},
>  {
>    "val":"socal",
>  

BinFileDataSource delta import

2016-03-28 Thread Aswath Srinivasan (TMS)
Hi fellow developers,

We are using "BinFileDataSource" datasource in our DIH config file to index 
local file system files. It is able to index the files however, during the next 
cycle of indexing, files that were removed from source file system folder is 
not removed from index. I believe Solr currently has no capability of doing 
this. Can someone please confirm based on your experience?

Also, does delta import work for this datasource? It dosen't seem to work for 
me.




  
  
  
  
  
  
  

Thank you,
Aswath NS



[nesting] JSON Facet API vs. BlockJoin Faceting: need help on queries (Facet API facets by wrong doc level VS. BlockJoin Faceting does not return top 10 most frequent)

2016-03-28 Thread Alisa Z .
 Hi all, 

I am trying to perform faceting of parent docs by nested document fields. I've 
tried 2 approaches as in subject, yet in first the results are not quite 
correct and in the 2nd I cannot get the query right. So I need help on either 
of them and any explication or documentation or blogs on the behavior is much 
appreciated.   

Verbally the query is as follows: "Find top 10 keywords for all documents with 
"california" in email subject line"

Here is the query with responses: 

 Json Facet API   

curl http://localhost:8985/solr/my_collection/query -d 
'q={!parent%20which="type_s:doc"}type_s:doc.userData%20%2BSubject_t:california=0&
json.facet={
  filter_by_child_type :{
    type:query,
    q:"type_s:doc.enriched.text.keywords",
    domain: { blockChildren : "type_s:doc" },
    facet:{
  top_keywords_text : {
    type: terms,
    field: text_t,
    limit: 10
  }
    }
  }
}'

RETURNS:  

{
  "responseHeader":{
    "status":0,
    "QTime":134,
    "params":{
  "q":"{!parent which=\"type_s:doc\"}type_s:doc.userData 
+Subject_t:california",
  "json.facet":"{\n  filter_by_child_type :{\n    type:query,\n    
q:\"type_s:doc.enriched.text.keywords\",\n    domain: { blockChildren : 
\"type_s:doc\" },\n    facet:{\n  top_keywords_text : {\n    type: 
terms,\n    field: text_t,\n    limit: 10\n  }\n    }\n  }\n}",
  "rows":"0"}},
  "response":{"numFound":19,"start":0,"docs":[]
  },
  "facets":{
    "count":19,
    "filter_by_child_type":{
  "count":686,
  "top_keywords_text":{
    "buckets":[{
    "val":"enron",
    "count":57},
  {
    "val":"california",
    "count":22},
  {
    "val":"power",
    "count":21},
  {
    "val":"rate",
    "count":15},
  {
    "val":"plan",
    "count":13},
  {
    "val":"hou",
    "count":12},
  {
    "val":"energy",
    "count":11},
  {
    "val":"na",
    "count":11},
  {
    "val":"mckinsey",
    "count":10},
  {
    "val":"socal",
    "count":10}]


QUESTION:  where do the counts greater than 19 (the total number of the 
top-level documents returned by the query) comes from?  How to adjust the query 
to facet only on the top-level documents (and consequently no count should be 
greater than 19)? 


= BlockJoin Faceting == 
Following the example on  
https://cwiki.apache.org/confluence/display/solr/BlockJoin+Faceting , I've 
tried this:  

/bjqfacet?q={!parent%20which=type_s:doc}type_s:doc.enriched.text.keywords=text_t=10=5=0={!parent%20which=type_s:doc}type_s:doc.userData%20%2BSubject_t:california=json=true

RETURNS: 

{
  "responseHeader":{
"status":0,
"QTime":1},
  "response":{"numFound":19,"start":0,"docs":[]
  },
  "facet_counts":[
"facet_fields",[
  "text_t",[
"128x",1,
"18xx",1,
"1x",1,
"2",2,
"30",1,
"60",1,
"78xx",1,
"82xx",1,
"ab",2,
"access",5,
"account",1,
"accounts",1,
...
"california",13,
...
"enron",9,
...
]]]}

QUESTION: This looks very close to what I want, yet why  
child.facet.limit=10=5 are ignored?  How to get top 10 
most frequent? 


Thank you for your help in advance! 

-- 
Alisa Zhila

Re: Is there any JIRA changed the stored order of multivalued field?

2016-03-28 Thread Chris Hostetter

: We do POST to add data to Solr v4.7 and Solr v5.3.2 respectively. The
: attachmentnames are in 789, 456, 123 sequence:
...  
: And we do GET to select data from solr v4.7 and solr v5.3.2 respectively:
: http://host:port/solr/collection1/select?q=id:1=json=true
...
: Is there any JIRA fixed making this order changed? Thanks!

https://issues.apache.org/jira/browse/SOLR-5777

The bug wasn't in returning stored fields, it was in how the JSON was 
parsed when a field name was specified multiple times (instead of a single 
time with an array of values) when adding a document.





-Hoss
http://www.lucidworks.com/


Re[2]: Solr-5.5.0 doesn't recognize difefrent types of _childDocuments_ any more --degrading since 5.3.1?

2016-03-28 Thread Alisa Z .
 Oh, I apologize...
When I ran it the first time, I must have tried putting it in a different 
collection. Now that I saw it and put it into the correct collection (where the 
schema is adjusted properly), it worked! 

Thanks,  that was the solution.  

 
>Понедельник, 28 марта 2016, 14:44 -04:00 от Erik Hatcher 
>:
>
>Alisa - sorry for not seeing this sooner, but I think Yonik is right… try 
>adding `-format solr` to the command-line of bin/post.
>
>Solr 5.5 is where the changed occurred to use a different end-point for JSON.
>
>—
>Erik Hatcher, Senior Solutions Architect
>http://www.lucidworks.com
>
>
>
>>On Mar 28, 2016, at 2:04 PM, Alisa Z. < prol...@mail.ru > wrote:
>>@Yonik, thank you for your response. 
>>
>>I think that the issue is of a different kind because my upload used to work 
>>well on Solr 5.3.1 and does not want to work on Solr 5.5.0 because of some 
>>changes in dynamic schema recognition.  So maybe you could advise on 
>>reconsidering the data model that I am using. 
>>
>>I have the  type_s field serving as an indicator of different types of 
>>parents and children. However, in my data model, siblings at one level could 
>>be of different type/category, e.g.,:
>>
>>- 
>>type_s: PARENT
>>---/---|\
>>- type_s: child_type1 --  
>>type_s: child_type2   - type_s: child_type3
>>--/--\ 
>>- 
>>/--\---/        \ 
>>
>>type_s: grandchild_type4    type_s: grandchild_type5       grandchild_type6   
>>    grandchild_type4  grandchild_type7   grandchild_type5
>> 
>>So the hierarchy distinguishing field  type_s can have different values at 
>>different levels of the hierarchy because the nodes could be of different 
>>type.
>>
>>
>>Further, in Solr 5.3.1 
>>solr-5.3.1$ bin/post -c my_collection ../data/data-solr.json 
>>doesn't produce any error and I can produce BlockJoin queries using  type_s 
>>field for indicating the nodes.   
>>
>>However, in Solr 5.5.0, when I try upload the same data in the same format 
>>(which was consumed perfectly in Solr 5.3.2):
>>solr-5.5.0$ bin/post -c my_collection ../data/data-solr.json
>>I get the following error:  
>>"msg":"ERROR: [parent=id1] multiple values encountered for non multiValued 
>>field _childDocuments_._childDocuments_.type_s: [grandchild_type4, 
>>grandchild_type5]" .
>>
>>
>>So now I feel that I should have either 2 types of fields for hierarchy 
>>description: one for hierarchy level specification and another for type of 
>>node specification; or make all single-valued fields multi-valued in 
>>descendants.  However, I am not sure whetherte 2nd option will uniquely  
>>specify a document. 
>>
>>Can anybody advise on the data modelling/schema approach for successful 
>>navigation a hierarchical data structure?  
>>I will be trying to adapt the approach outlined in " The Many Facets of 
>>Apache Solr " to my data. Yet I would like to hear any other practical tips 
>>for hierarchical data on Solr 5.5?
>>
>>Thank you in advance. 
>>--Alisa 
>>
>>
>>>Sat, 26 Mar 2016 -4:48:00 -0400 от Yonik Seeley < ysee...@gmail.com >:
>>>
>>>Found the JIRA:   https://issues.apache.org/jira/browse/SOLR-7042
>>>It looks like you can try adding
>>>   -format solr
>>>to your bin/post command line to get back to normal "solr JSON"
>>>
>>>-Yonik
>>>
>>>
>>>On Fri, Mar 25, 2016 at 8:43 PM, Yonik Seeley <  ysee...@gmail.com > wrote:
On Fri, Mar 25, 2016 at 6:19 PM, Alisa Z. <  prol...@mail.ru > wrote:
>Hi all,
>It is partially a question, partially a discussion.
>I am working with documents with deep levels of nesting. The documents are 
>in a single JSON file (see a sample below).
>
>When I was on Solr 5.3.1,
>solr-5.3.1$ bin/post -c my_collection ../data/data-solr.json

I think i recall seeing a JIRA go by that changed the URL that
/bin/post hits from /update/json to /update/json/docs.
I know the latter does more processing and handles "custom" JSON, but
I don't know the details.  That would be my guess about what changed
and what's messing you up.

You could try using curl directly to /update/json and see if that works 
better.

-Yonik
>>
>



Re: Solr-5.5.0 doesn't recognize difefrent types of _childDocuments_ any more --degrading since 5.3.1?

2016-03-28 Thread Erik Hatcher
Alisa - sorry for not seeing this sooner, but I think Yonik is right… try 
adding `-format solr` to the command-line of bin/post.

Solr 5.5 is where the changed occurred to use a different end-point for JSON.

—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com 



> On Mar 28, 2016, at 2:04 PM, Alisa Z.  wrote:
> 
> @Yonik, thank you for your response. 
> 
> I think that the issue is of a different kind because my upload used to work 
> well on Solr 5.3.1 and does not want to work on Solr 5.5.0 because of some 
> changes in dynamic schema recognition.  So maybe you could advise on 
> reconsidering the data model that I am using. 
> 
> I have the  type_s field serving as an indicator of different types of 
> parents and children. However, in my data model, siblings at one level could 
> be of different type/category, e.g.,:
> 
> - 
> type_s: PARENT
> ---/---|\
> - type_s: child_type1 --  
> type_s: child_type2   - type_s: child_type3
> --/--\ 
> - 
> /--\---/\ 
> 
> type_s: grandchild_type4type_s: grandchild_type5   grandchild_type6   
> grandchild_type4  grandchild_type7   grandchild_type5
>  
> So the hierarchy distinguishing field  type_s can have different values at 
> different levels of the hierarchy because the nodes could be of different 
> type.
> 
> 
> Further, in Solr 5.3.1 
> solr-5.3.1$ bin/post -c my_collection ../data/data-solr.json 
> doesn't produce any error and I can produce BlockJoin queries using  type_s 
> field for indicating the nodes.   
> 
> However, in Solr 5.5.0, when I try upload the same data in the same format 
> (which was consumed perfectly in Solr 5.3.2):
> solr-5.5.0$ bin/post -c my_collection ../data/data-solr.json
> I get the following error:  
> "msg":"ERROR: [parent=id1] multiple values encountered for non multiValued 
> field _childDocuments_._childDocuments_.type_s: [grandchild_type4, 
> grandchild_type5]" .
> 
> 
> So now I feel that I should have either 2 types of fields for hierarchy 
> description: one for hierarchy level specification and another for type of 
> node specification; or make all single-valued fields multi-valued in 
> descendants.  However, I am not sure whetherte 2nd option will uniquely  
> specify a document. 
> 
> Can anybody advise on the data modelling/schema approach for successful 
> navigation a hierarchical data structure?  
> I will be trying to adapt the approach outlined in " The Many Facets of 
> Apache Solr " to my data. Yet I would like to hear any other practical tips 
> for hierarchical data on Solr 5.5?
> 
> Thank you in advance. 
> --Alisa 
> 
> 
>> Sat, 26 Mar 2016 -4:48:00 -0400 от Yonik Seeley :
>> 
>> Found the JIRA:  https://issues.apache.org/jira/browse/SOLR-7042
>> It looks like you can try adding
>>-format solr
>> to your bin/post command line to get back to normal "solr JSON"
>> 
>> -Yonik
>> 
>> 
>> On Fri, Mar 25, 2016 at 8:43 PM, Yonik Seeley < ysee...@gmail.com > wrote:
>>> On Fri, Mar 25, 2016 at 6:19 PM, Alisa Z. < prol...@mail.ru > wrote:
 Hi all,
 It is partially a question, partially a discussion.
 I am working with documents with deep levels of nesting. The documents are 
 in a single JSON file (see a sample below).
 
 When I was on Solr 5.3.1,
 solr-5.3.1$ bin/post -c my_collection ../data/data-solr.json
>>> 
>>> I think i recall seeing a JIRA go by that changed the URL that
>>> /bin/post hits from /update/json to /update/json/docs.
>>> I know the latter does more processing and handles "custom" JSON, but
>>> I don't know the details.  That would be my guess about what changed
>>> and what's messing you up.
>>> 
>>> You could try using curl directly to /update/json and see if that works 
>>> better.
>>> 
>>> -Yonik
> 



Re[2]: Solr-5.5.0 doesn't recognize difefrent types of _childDocuments_ any more --degrading since 5.3.1?

2016-03-28 Thread Alisa Z .
 @Yonik, thank you for your response. 

I think that the issue is of a different kind because my upload used to work 
well on Solr 5.3.1 and does not want to work on Solr 5.5.0 because of some 
changes in dynamic schema recognition.  So maybe you could advise on 
reconsidering the data model that I am using. 

I have the  type_s field serving as an indicator of different types of parents 
and children. However, in my data model, siblings at one level could be of 
different type/category, e.g.,:

- 
type_s: PARENT
---/---|\
- type_s: child_type1 --  
type_s: child_type2   - type_s: child_type3
--/--\ 
- 
/--\---/        \   
  
type_s: grandchild_type4    type_s: grandchild_type5       grandchild_type6 
  grandchild_type4  grandchild_type7   grandchild_type5
 
So the hierarchy distinguishing field  type_s can have different values at 
different levels of the hierarchy because the nodes could be of different type.


Further, in Solr 5.3.1 
solr-5.3.1$ bin/post -c my_collection ../data/data-solr.json 
doesn't produce any error and I can produce BlockJoin queries using  type_s 
field for indicating the nodes.   

However, in Solr 5.5.0, when I try upload the same data in the same format 
(which was consumed perfectly in Solr 5.3.2):
solr-5.5.0$ bin/post -c my_collection ../data/data-solr.json
I get the following error:  
"msg":"ERROR: [parent=id1] multiple values encountered for non multiValued 
field _childDocuments_._childDocuments_.type_s: [grandchild_type4, 
grandchild_type5]" .


So now I feel that I should have either 2 types of fields for hierarchy 
description: one for hierarchy level specification and another for type of node 
specification; or make all single-valued fields multi-valued in descendants.  
However, I am not sure whetherte 2nd option will uniquely  specify a document. 

Can anybody advise on the data modelling/schema approach for successful 
navigation a hierarchical data structure?  
I will be trying to adapt the approach outlined in " The Many Facets of Apache 
Solr " to my data. Yet I would like to hear any other practical tips for 
hierarchical data on Solr 5.5?

Thank you in advance. 
--Alisa 


>Sat, 26 Mar 2016 -4:48:00 -0400 от Yonik Seeley :
>
>Found the JIRA:  https://issues.apache.org/jira/browse/SOLR-7042
>It looks like you can try adding
>   -format solr
>to your bin/post command line to get back to normal "solr JSON"
>
>-Yonik
>
>
>On Fri, Mar 25, 2016 at 8:43 PM, Yonik Seeley < ysee...@gmail.com > wrote:
>> On Fri, Mar 25, 2016 at 6:19 PM, Alisa Z. < prol...@mail.ru > wrote:
>>>  Hi all,
>>> It is partially a question, partially a discussion.
>>> I am working with documents with deep levels of nesting. The documents are 
>>> in a single JSON file (see a sample below).
>>>
>>> When I was on Solr 5.3.1,
>>> solr-5.3.1$ bin/post -c my_collection ../data/data-solr.json
>>
>> I think i recall seeing a JIRA go by that changed the URL that
>> /bin/post hits from /update/json to /update/json/docs.
>> I know the latter does more processing and handles "custom" JSON, but
>> I don't know the details.  That would be my guess about what changed
>> and what's messing you up.
>>
>> You could try using curl directly to /update/json and see if that works 
>> better.
>>
>> -Yonik



Re: Unable to create collection in 5.5

2016-03-28 Thread Yago Riveiro
Because I have codebase that relay in logic to resolve the name of
collections.

  

With this modification I'm forced to have logic to handled old and new
collections when this should be transparent.

  

If I have collection collection-1, collection-2, collection-3 created with a
external tool, upgrading to 5.5 now I have collection-1, collection-2,
collection-3 and collection_x.

  

A way to resolve this problem can be aliases, but the collection API doesn't
list the aliases in LIST command and read the noise CLUSTERSTATE command to
fetch collections (and aliases) in cluster with thousand of collections is
like no-no.  
  

Sorry but without a way to rename old collection to collection_*, the enforce
to do not allow hyphens is frustrating as a user.

  

\--

  

/Yago Riveiro

  

![](https://link.nylas.com/open/m7fkqw0yim04itb62itnp7r9/ec42b9ccdd9a4285b0ff0
8cf203af0f2)

On Mar 28 2016, at 6:07 pm, Anshum Gupta ans...@anshumgupta.net wrote:  

> I'm not sure why this would be a problem as older collections would  
continue to work just fine. Do you mean that the restriction doesn't allow  
you to e.g. add a shard with a valid name, to an older collection ?

>

> On Mon, Mar 28, 2016 at 9:22 AM, Yago Riveiro yago.rive...@gmail.com  
wrote:

>

>  This kind of stuff can't be released without a way to rename the
current  
 collections with hyphens (even for 6.0)  
  
  
  
 \\--  
  
  
  
 /Yago Riveiro  
  
  
  
 ![](  

https://link.nylas.com/open/m7fkqw0yim04itb62itnp7r9/d6c3ba33ed5f4ac8af3b2  
 9c07e2c5e91)  
  
 On Mar 28 2016, at 5:19 pm, Anshum Gupta
lt;ans...@anshumgupta.netgt;  
 wrote:  
  
  Yes, this was added in 5.5, though I think it shouldn't have been,  
 specially the hyphens.  
 The hyphen was added back as part of SOLR-8725 but it would only be would  
 with 6.0 (and 5.5.1).  
  
   
  
   
 On Mon, Mar 28, 2016 at 7:36 AM, Yago Riveiro
lt;yago.rive...@gmail.com  
 gt;  
 wrote:  
  
   
  
  gt; Hi,  
 gt;  
 gt; With solr 5.5 I can't create a collection with the name
collection-16,  
 and  
 gt; in 5.3.1 I can do it, Why?  
 gt;  
 gt; lt;?xml version="1.0" encoding="UTF-8"?gt;  
 gt; lt;responsegt;  
 gt; lt;lst name="responseHeader"gt;lt;int  
 name="status"gt;400lt;/intgt;lt;int  
 gt;
name="QTime"gt;1lt;/intgt;lt;/lstgt;lt;lst  
 name="error"gt;lt;lst  
 name="metadata"gt;lt;str  
 gt; name="error-  
 class"gt;org.apache.solr.common.SolrExceptionlt;/strgt;
p;lt;str  
 gt;  
 gt; name="root-error-  
  
 class"gt;org.apache.solr.common.SolrExceptionlt;/strgt;
p;lt;/lstgt;lt;str  
 gt; name="msg"gt;Invalid name: 'collection-16' Identifiers must
consist  
 entirely  
 gt; of periods, underscores and
alphanumericslt;/strgt;lt;int  
 gt; name="code"gt;400lt;/intgt;lt;/lstgt;  
 gt; lt;/responsegt;  
 gt;  
 gt;  
 gt;  
 gt; \\-  
 gt; Best regards  
 gt; \\--  
 gt; View this message in context:  
 gt; http://lucene.472066.n3.nabble.com/Unable-to-create-
collection-  
 in-5-5-tp4266437.html  
 gt; Sent from the Solr - User mailing list archive at Nabble.com.  
 gt;  
  
   
  
  \\--  
 Anshum Gupta  
  


>

>  
\--  
Anshum Gupta



Re: Unable to create collection in 5.5

2016-03-28 Thread Anshum Gupta
I'm not sure why this would be a problem as older collections would
continue to work just fine. Do you mean that the restriction doesn't allow
you to e.g. add a shard with a valid name, to an older collection ?

On Mon, Mar 28, 2016 at 9:22 AM, Yago Riveiro 
wrote:

> This kind of stuff can't be released without a way to rename the current
> collections with hyphens (even for 6.0)
>
>
>
> \--
>
>
>
> /Yago Riveiro
>
>
>
> ![](
> https://link.nylas.com/open/m7fkqw0yim04itb62itnp7r9/d6c3ba33ed5f4ac8af3b2
> 9c07e2c5e91)
>
> On Mar 28 2016, at 5:19 pm, Anshum Gupta ans...@anshumgupta.net
> wrote:
>
> > Yes, this was added in 5.5, though I think it shouldn't have been,
> specially the hyphens.
> The hyphen was added back as part of SOLR-8725 but it would only be would
> with 6.0 (and 5.5.1).
>
> >
>
> >
> On Mon, Mar 28, 2016 at 7:36 AM, Yago Riveiro yago.rive...@gmail.com
> 
> wrote:
>
> >
>
> >  Hi,
> 
>  With solr 5.5 I can't create a collection with the name collection-16,
> and
>  in 5.3.1 I can do it, Why?
> 
>  ?xml version="1.0" encoding="UTF-8"?
>  response
>  lst name="responseHeader"int
> name="status"400/intint
>  name="QTime"1/int/lstlst
> name="error"lst
> name="metadata"str
>  name="error-
> class"org.apache.solr.common.SolrException/strstr
> 
>  name="root-error-
>
> class"org.apache.solr.common.SolrException/str/lststr
>  name="msg"Invalid name: 'collection-16' Identifiers must consist
> entirely
>  of periods, underscores and alphanumerics/strint
>  name="code"400/int/lst
>  /response
> 
> 
> 
>  \-
>  Best regards
>  \--
>  View this message in context:
>   in-5-5-tp4266437.html>
>  Sent from the Solr - User mailing list archive at Nabble.com.
> 
>
> >
>
> > \--
> Anshum Gupta
>
>


-- 
Anshum Gupta


Re: How to implement Autosuggestion

2016-03-28 Thread Reth RM
Solr AnalyzingInfix suggester component:
https://lucidworks.com/blog/2015/03/04/solr-suggester/



On Mon, Mar 28, 2016 at 7:57 PM, Mugeesh Husain  wrote:

> Hi,
>
> I am looking for the best way to implement autosuggestion in ecommerce
> using solr or elasticsearch.
>
> I guess using ngram analyzer is not a good way if data is big.
>
>
> Please suggest me any link or your opinion ?
>
>
>
> Thanks
> Mugeesh
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-implement-Autosuggestion-tp4266434.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Problem in Issuing a Command to Upload Configuration

2016-03-28 Thread Reth RM
I think it should be "zkcli.bat" (all in lower case) that is shipped with
solr not zkCli.cmd(that is shipped with zookeeper)

solr_home/server/scripts/cloud-scripts/zkcli.bat -zkhost 127.0.0.1:9983 \
   -cmd upconfig -confname my_new_config -confdir
server/solr/configsets/basic_configs/conf

On Mon, Mar 28, 2016 at 8:18 PM, Salman Ansari 
wrote:

> Hi,
>
> I am facing issue uploading configuration to Zookeeper ensemble. I am
> running this on Windows as
>
> *Command*
> **
> zkCli.cmd -cmd upconfig -zkhost
> "[localserver]:2181,[second_server]:2181,[third_server]:2181" -confname
> [config_name]  -confdir "[config_dir]"
>
> and I got the following result
>
> *Result*
> =
> Connecting to localhost:2181
> 2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
> 2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:host.name=SabrSolrServer1.SabrSolrServer1.a2.internal.cloudapp.net
> 2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:java.version=1.8.0_77
> 2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:java.vendor=Oracle Corporation
> 2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:java.home=C:\Program Files\Java\jre1.8.0_77
> 2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
> environm
>
> ent:java.class.path=C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\build\classes;C:\So
>
> lr\Zookeeper\zookeeper-3.4.6\bin\..\build\lib\*;C:\Solr\Zookeeper\zookeeper-3.4.
>
> 6\bin\..\zookeeper-3.4.6.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\lib\jline-
>
> 0.9.94.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\lib\log4j-1.2.16.jar;C:\Solr
>
> \Zookeeper\zookeeper-3.4.6\bin\..\lib\netty-3.7.0.Final.jar;C:\Solr\Zookeeper\zo
>
> okeeper-3.4.6\bin\..\lib\slf4j-api-1.6.1.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\b
>
> in\..\lib\slf4j-log4j12-1.6.1.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\conf
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
>
> ent:java.library.path=C:\ProgramData\Oracle\Java\javapath;C:\Windows\Sun\Java\bi
>
> n;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\
>
> system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShe
> ll\v1.0\;C:\Program Files\Java\JDK\bin;.
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:java.io.tmpdir=C:\Users\ADMIN_~1\AppData\Local\Temp\2\
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:java.compiler=
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:os.name=Windows Server 2012 R2
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:os.arch=amd64
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:os.version=6.3
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:user.name=admin_user
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:user.home=C:\Users\admin_user
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
> environm
> ent:user.dir=C:\Solr\Zookeeper\zookeeper-3.4.6\bin
> 2016-03-28 14:40:12,865 [myid:] - INFO  [main:ZooKeeper@438] - Initiating
> client
>  connection, connectString=localhost:2181 sessionTimeout=3
> watcher=org.apach
> e.zookeeper.ZooKeeperMain$MyWatcher@506c589e
>
> It looks like that it is not even calling the command. Any idea why is that
> happening?
>
> Regards,
> Salman
>


Re: Unable to create collection in 5.5

2016-03-28 Thread Yago Riveiro
This kind of stuff can't be released without a way to rename the current
collections with hyphens (even for 6.0)

  

\--

  

/Yago Riveiro

  

![](https://link.nylas.com/open/m7fkqw0yim04itb62itnp7r9/d6c3ba33ed5f4ac8af3b2
9c07e2c5e91)

On Mar 28 2016, at 5:19 pm, Anshum Gupta ans...@anshumgupta.net wrote:  

> Yes, this was added in 5.5, though I think it shouldn't have been,  
specially the hyphens.  
The hyphen was added back as part of SOLR-8725 but it would only be would  
with 6.0 (and 5.5.1).

>

>  
On Mon, Mar 28, 2016 at 7:36 AM, Yago Riveiro yago.rive...@gmail.com  
wrote:

>

>  Hi,  
  
 With solr 5.5 I can't create a collection with the name collection-16,
and  
 in 5.3.1 I can do it, Why?  
  
 ?xml version="1.0" encoding="UTF-8"?  
 response  
 lst name="responseHeader"int
name="status"400/intint  
 name="QTime"1/int/lstlst name="error"lst
name="metadata"str  
 name="error-
class"org.apache.solr.common.SolrException/strstr  
  
 name="root-error-
class"org.apache.solr.common.SolrException/str/lststr  
 name="msg"Invalid name: 'collection-16' Identifiers must consist
entirely  
 of periods, underscores and alphanumerics/strint  
 name="code"400/int/lst  
 /response  
  
  
  
 \-  
 Best regards  
 \--  
 View this message in context:  
   
 Sent from the Solr - User mailing list archive at Nabble.com.  


>

> \--  
Anshum Gupta



Re: Unable to create collection in 5.5

2016-03-28 Thread Anshum Gupta
Yes, this was added in 5.5, though I think it shouldn't have been,
specially the hyphens.
The hyphen was added back as part of SOLR-8725 but it would only be would
with 6.0 (and 5.5.1).


On Mon, Mar 28, 2016 at 7:36 AM, Yago Riveiro 
wrote:

> Hi,
>
> With solr 5.5 I can't create a collection with the name collection-16, and
> in 5.3.1 I can do it, Why?
>
> 
> 
> 400 name="QTime">1 name="error-class">org.apache.solr.common.SolrException
> name="root-error-class">org.apache.solr.common.SolrException name="msg">Invalid name: 'collection-16' Identifiers must consist entirely
> of periods, underscores and alphanumerics name="code">400
> 
>
>
>
> -
> Best regards
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Unable-to-create-collection-in-5-5-tp4266437.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Anshum Gupta


Problem in Issuing a Command to Upload Configuration

2016-03-28 Thread Salman Ansari
Hi,

I am facing issue uploading configuration to Zookeeper ensemble. I am
running this on Windows as

*Command*
**
zkCli.cmd -cmd upconfig -zkhost
"[localserver]:2181,[second_server]:2181,[third_server]:2181" -confname
[config_name]  -confdir "[config_dir]"

and I got the following result

*Result*
=
Connecting to localhost:2181
2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:host.name=SabrSolrServer1.SabrSolrServer1.a2.internal.cloudapp.net
2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.version=1.8.0_77
2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.vendor=Oracle Corporation
2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.home=C:\Program Files\Java\jre1.8.0_77
2016-03-28 14:40:12,849 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.class.path=C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\build\classes;C:\So
lr\Zookeeper\zookeeper-3.4.6\bin\..\build\lib\*;C:\Solr\Zookeeper\zookeeper-3.4.
6\bin\..\zookeeper-3.4.6.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\lib\jline-
0.9.94.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\lib\log4j-1.2.16.jar;C:\Solr
\Zookeeper\zookeeper-3.4.6\bin\..\lib\netty-3.7.0.Final.jar;C:\Solr\Zookeeper\zo
okeeper-3.4.6\bin\..\lib\slf4j-api-1.6.1.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\b
in\..\lib\slf4j-log4j12-1.6.1.jar;C:\Solr\Zookeeper\zookeeper-3.4.6\bin\..\conf
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.library.path=C:\ProgramData\Oracle\Java\javapath;C:\Windows\Sun\Java\bi
n;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\
system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShe
ll\v1.0\;C:\Program Files\Java\JDK\bin;.
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.io.tmpdir=C:\Users\ADMIN_~1\AppData\Local\Temp\2\
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:java.compiler=
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:os.name=Windows Server 2012 R2
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:os.arch=amd64
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:os.version=6.3
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:user.name=admin_user
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:user.home=C:\Users\admin_user
2016-03-28 14:40:12,865 [myid:] - INFO  [main:Environment@100] - Client
environm
ent:user.dir=C:\Solr\Zookeeper\zookeeper-3.4.6\bin
2016-03-28 14:40:12,865 [myid:] - INFO  [main:ZooKeeper@438] - Initiating
client
 connection, connectString=localhost:2181 sessionTimeout=3
watcher=org.apach
e.zookeeper.ZooKeeperMain$MyWatcher@506c589e

It looks like that it is not even calling the command. Any idea why is that
happening?

Regards,
Salman


Unable to create collection in 5.5

2016-03-28 Thread Yago Riveiro
Hi,

With solr 5.5 I can't create a collection with the name collection-16, and
in 5.3.1 I can do it, Why?



4001org.apache.solr.common.SolrExceptionorg.apache.solr.common.SolrExceptionInvalid name: 'collection-16' Identifiers must consist entirely
of periods, underscores and alphanumerics400




-
Best regards
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Unable-to-create-collection-in-5-5-tp4266437.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SolrJ Indexing

2016-03-28 Thread Mugeesh Husain
Hi,

You should use/implement producer consumer program in java using
multithreading.
USE executor framework in java
 
Like this link 
http://www.journaldev.com/1069/java-thread-pool-example-using-executors-and-threadpoolexecutor


Thanks
Mugeesh




--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrJ-Indexing-tp4265506p4266436.html
Sent from the Solr - User mailing list archive at Nabble.com.


How to implement Autosuggestion

2016-03-28 Thread Mugeesh Husain
Hi,

I am looking for the best way to implement autosuggestion in ecommerce 
using solr or elasticsearch.

I guess using ngram analyzer is not a good way if data is big.


Please suggest me any link or your opinion ?



Thanks
Mugeesh



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-implement-Autosuggestion-tp4266434.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: [scottchu] Is it possible to create a new colr in Solr 5.5 using my old schema.xml and solrconfig.xml?

2016-03-28 Thread Shawn Heisey
On 3/28/2016 12:54 AM, scott.chu wrote:
> I have old schema.xml and solrconfig.xml from Solr 3.5. I want to rebuild the 
> core structure in Solr 5.5. I got some questions to request for answer or 
> suggestions:
>
> 1. Can I just put these 2 old xmls into the config folder and issue 
> 'bin\solr.cmd -c corename -d config folder path' to build a Solr 5.5 core? If 
> not, what modification should I make?
> (Note: AFAIK, MainIndex and IndexDefaults are replaced IndexConfig and no 
> long exist in new solrconfig.xml. Besides, there're no any schema.xmls in 
> Solr 5.5's examples.)

Solr 5.5 is capable of using schema.xml, but every 5.5 example was
changed to use the Managed schema factory instead of the Classic.  In
earlier versions, at least one one of the example configsets used the
Classic schema.

Most likely a 3.5 config will *not* work as-is in any 5.x version. 
There have simply been too many changes from two major releases and a
LOT of minor releases.

When the version jump is small and doesn't include a major release,
upgrading and using your existing config is usually no big deal.  With a
jump from 3.5 to 5.5, the best option is to start with a 5.5 example and
modify it (using 5.5 options, not 3.5) until it does what you need. 
This will mean adding the replication configuration and anything else
that's custom in the 3.5 config.  You may need to compare the
collection1 example config from 3.5 to the configsets in 5.5 to get an
idea of what's changed.

Something else to consider is starting with 5.4.1 instead of 5.5. 
Between the managed-schema changes and a handful of bugs in 5.5, the
techproducts-sample-configs configset found in 5.4.1 will probably work
better for you, and that config will probably work well through the
first few releases in 6.x with only *minor* changes.

> 2. What should I put in that config folder? Are they same as in Solr 3.5's?

It needs solrconfig.xml and a schema file whose name may be controlled
by solrconfig.xml.  Also add any support files referenced by either of
those files.  Support files can include one or more DIH configs,
synonyms, stopwords, etc.

> 3. Is there any special rules where I put the config folder? For example, Do 
> I have to put that folder under solr-5.5.0\server\solr\configsets? Is this 
> path must be relative to Solr home folder?

For the most part, data under configsets is used when creating a new
core with the "bin/solr create" command.  The configset will be copied
to the correct location (either core/conf or zookeeper) when creating a
new core/collection.  There is a non-cloud feature called configsets
which actually does use/share the configset files directly, but this
feature has some quirks and some things may not work as expected.

> 4. If the core is created ok, where is the the core folder that Solr has 
> built?

I'm assuming that you're talking about using the "bin/solr create"
command.  This will create a new core instanceDir in the solr home. 
Where this lives will depend on how you've started Solr, and whether you
used the service install script for Linux/UNIX platforms.

> 5. Is creating core with schema.xml achievable via admin UI?

This is a difficult question to answer, because creating cores with the
CoreAdmin section of the UI usually doesn't work the way people expect
it to.  If you're running SolrCloud, the CoreAdmin feature should not be
used at all.  With SolrCloud, you can definitely create new collections
without touching the filesystem directly, using the Collections API.

Thanks,
Shawn



RE: failed to connect solr server through my website

2016-03-28 Thread Adel Mohamed Khalifa
Hello Andrea,

 

I blocked my firewall and my search website connect perfectly to solr engine 
when in netbeans at windows but when I  send it to production or use it through 
netbeans in Ubuntu it cannot be connect

 

Regards,
Adel Khalifa 

 

From: Andrea Gazzarini [mailto:gxs...@gmail.com] 
Sent: Monday, March 28, 2016 12:54 PM
To: solr-user@lucene.apache.org
Subject: Re: failed to connect solr server through my website

 

Hi Adel,
As far as I know, the mailing list doesn't allow attachments. Please paste the 
relevant part of your log

Andrea

On 28 Mar 2016 11:18, "Adel Mohamed Khalifa"  wrote:

Hello All,

 

I failed to connect solr server through my website, I attached my solr log if 
anyone can help me please?

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | 
M +2 01149247744   | Fax +2 023 303 2036 | Follow us on 
 

 Description: cid:image001.gif@01D11A1D.D81CE0C0 |  
 Description: cid:image002.gif@01D11A1D.D81CE0C0 
|  

 Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 



Re: SolrCloud: published host/port

2016-03-28 Thread Hendrik Haddorp
Thanks, that seems to work. A bit more complicated then in ES but doable.

Hendrik

On 24/03/16 17:25, Tomás Fernández Löbbe wrote:
> I believe this can be done by setting the "host" and "hostPort" elements in
> solr.xml. In the default solr.xml they are configured in a way to support
> also setting them via System properties:
>
> ${host:}
> ${jetty.port:8983}
>
> Tomás
>
> On Wed, Mar 23, 2016 at 11:26 PM, Hendrik Haddorp 
> wrote:
>
>> Hi,
>>
>> is it possible to instruct Solr to publish a different host/port into
>> ZooKeeper then it is actually running on? This is required if the Solr
>> node is not directly reachable on its port from outside due to a NAT
>> setup or when running Solr as a Docker container with a mapped port.
>>
>> For what its worth ElasticSearch is supporting this as documented here [1]:
>> - transport.publish_port
>> - transport.publish_host
>>
>> regards,
>> Hendrik
>>
>> [1]
>>
>> https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html
>>



Re: XJoin, a way to use external data sources with Solr

2016-03-28 Thread Zisis Tachtsidis
Hi Tom,

Thanks for clarifying the purpose of XJoin, makes sense now. Hope it makes
it into Solr's main branch, this could prove useful! For the time being
PostFilter covers my needs. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/XJoin-a-way-to-use-external-data-sources-with-Solr-tp4254055p4266407.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Use default field, if more specific field does not exist

2016-03-28 Thread Emir Arnautovic

Hi Georg,
I cannot think of similar trick that would enable you to facet on all 
values (other than applying this trick to buckets of size 1) but would 
warn you about faceting of high cardinality fields such as price. Not 
sure if you have some specific case, but calculating facet for such 
field can be pretty expensive and slow.
I haven't look at it in details, but maybe you could find something 
useful in new Json facet API.


Regards,
Emir

On 26.03.2016 12:15, Georg Sorst wrote:

Hi Emir,

that sounds like a great idea and filtering should be just fine!

In our case we need the individual price values (not the buckets), just
like facet.field=price but with respect to the user prices. Is this
possible as well?

About the performance: Are there any specific bottlenecks you would expect?

Best regards,
Georg

Emir Arnautovic  schrieb am Fr., 25. März
2016 um 11:47 Uhr:


Hi Georg,
One solution that could work on existing schema is to use query faceting
and queries like (for USER_ID = 1, bucker 100 to 200):

price_1:[100 TO 200] OR (-price_1:[* TO *] AND price:[100 TO 200])

Same query is used for filtering. What you should test is if
performances are acceptable.

Thanks,
Emir

On 24.03.2016 22:31, Georg Sorst wrote:

Hi list,

we use Solr to search ecommerce products.

Items have a default price which can be overwritten per user. So when
searching we have to return the user price if it is set, otherwise the
default price. Same goes for building facets and when filtering by price.

What's the best way to achieve this in Solr? We know the user ID when
sending the request to Solr so we could do something like this:

* Add the default price in the field "price" to the items
* Add all the user prices in a field like "price_"

Now for displaying the correct price this is fine, just look if there is

a

field "price_" for this result item, otherwise just display the
value of the "price" field.

The tricky part is faceting and filtering. Which field do we use?
"price_"? What happens for users that don't have a user price

set

for an item? In this case the "price_" field does not exist so
faceting and filtering will not work.

We thought about adding a "price_" field for every item and

every

user and fill in the default price for the item if the user does not have
an overwritten price for this item. This would potentially make our index
unnecessarily large. Consider 10,000 items and 10,000 users (quite
realistic), that's 100,000,000 "price_" fields, even though

maybe

only a few users have overwritten prices.

What I've been (unsuccessfully) looking for is some sort of field

fallback

where I can tell Solr something like "use price_ for the

results,

facets and filter queries, and if that does not exist for an item, use
price instead". At first sight field aliases seemed like that but turns

out

that just renames the field in the result items.

So, is there something like this or is there a better solution anyway?

Thanks,
Georg

--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/

--

*Georg M. Sorst I CTO*
FINDOLOGIC GmbH



Jakob-Haringer-Str. 5a | 5020 Salzburg I T.: +43 662 456708
E.: g.so...@findologic.com
www.findologic.com Folgen Sie uns auf: XING
facebook
 Twitter


Wir sehen uns auf dem *Shopware Community Day in Ahaus am 20.05.2016!* Hier
 Termin
vereinbaren!
Wir sehen uns auf der* dmexco in Köln am 14.09. und 15.09.2016!* Hier
 Termin
vereinbaren!



--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/



RE: Indexing docuements in Solr 5 Using Tika extraction error

2016-03-28 Thread Allison, Timothy B.

> If you're going to use Tika for production indexing, you should write 
> a Java program using SolrJ and Tika so that you are in complete 
> control, and so Solr isn't unstable.

+1

https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201601.mbox/%3cby2pr09mb11210edfcfa297528940b07c7...@by2pr09mb112.namprd09.prod.outlook.com%3E


Re: failed to connect solr server through my website

2016-03-28 Thread Andrea Gazzarini
Hi Adel,
As far as I know, the mailing list doesn't allow attachments. Please paste
the relevant part of your log

Andrea
On 28 Mar 2016 11:18, "Adel Mohamed Khalifa" 
wrote:

> Hello All,
>
>
>
> I failed to connect solr server through my website, I attached my solr log
> if anyone can help me please?
>
>
>
>
> *Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2
> 023 303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | 
> *Follow
> us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
> *
>  |
> **[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
> * | **[image: Description:
> cid:image003.gif@01D11A1D.D81CE0C0]*
> 
> *[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*
>
>
>
>
>


RE: Making my own search website

2016-03-28 Thread Andrea Gazzarini
Hi Adel,
Is it possible that something (i.e. inbound or outbound firewall) forbids
the access to Solr from that machine?

Andrea
On 27 Mar 2016 14:46, "Adel Mohamed Khalifa" 
wrote:

> Thanks Andrea,
>
>
>
> I want to say if my string is wrong it would not connect when I connect
> from windows it’s the same code, I did not change in it.
>
>
>
> SOLR_SERVER_URL=http://172.16.0.72:8983/solr/SearchCore
>
>
>
> Regards,
> Adel Khalifa
>
>
>
>
>
> From: Andrea Gazzarini [mailto:gxs...@gmail.com]
> Sent: Sunday, March 27, 2016 2:22 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Making my own search website
>
>
>
> Hi Adel,
> Absolutely not sure what's happening on (Solr) server side, the first
> thing that comes on my mind is: if you're correctly accessing the solr
> admin console that means the string you're getting in that resource bundle
> is wrong. I'd print out that value in order to make sure about the
> correctness of that address or I would hard code the correct string itself.
>
> Best,
> Andrea
>
> P.S.: don't create a SolrServer instance for each http request. Better to
> define a member instance, initialize it in the init() method and close in
> the destroy()...that adheres much better to the servlet threading model.
>
> Hello All,
>
>
>
> First, I want to apology for my complexity needs before and that I cannot
> asking obviously.
>
>
>
> So Now, I create my Solr server and indexing I can log on it directly
> throw ( http://ip:port/solr/#  ) from ubuntu server
> or my windows laptop.
>
> I build my website on netbeans using J2EE on my windows laptop and add a
> servlet to access the solr server for searching and when I run it it works
> good.
>
>
>
> But the problem occurred when I try to run on it on the Ubuntu server it
> stopped at : -- SolrServer server = new HttpSolrServer(ip:port/solr/core);
>
> And it does not give me any exception.
>
>
>
> I attached the ajax code that I use to call the servlet and also attached
> the servlet code.
>
>
>
> Regards,
> Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext
> 112 | M +2 01149247744   | Fax +2 023 303 2036 |
> Follow us on  <
> https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark>
> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <
> https://twitter.com/Saudisoft> Description:
> cid:image002.gif@01D11A1D.D81CE0C0 |  <
> https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary>
> Description: cid:image003.gif@01D11A1D.D81CE0C0
> Description: cid:image004.jpg@01D11A1D.D81CE0C0
>
>
>
>
>
>


Re: score mixing

2016-03-28 Thread Mikhail Khludnev
Hello Michael,

You have a good chance with _val_:rank, I suppose see
https://cwiki.apache.org/confluence/display/solr/Function+Queries. Beware
of query parsing traps, check that query is parsed properly.

On Sun, Mar 27, 2016 at 11:57 AM, michael solomon 
wrote:

> Hi,
> I have nested documents and use in BlockJoinQueryParser.
> In parent documents I have "rank" field that give an arbitrary score for
> each parent.
> It's possible to mix the original scoring with mine? i.e:
> SolrScore+rank=finel score
> or(proportional scoring..)SolrScore/MaxScore + rank/MaxRank = finel
> score(between 0-1)
> Thanks,
> Michael
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





failed to connect solr server through my website

2016-03-28 Thread Adel Mohamed Khalifa
Hello All,

 

I failed to connect solr server through my website, I attached my solr log
if anyone can help me please?

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112
| M +2 01149247744 | Fax +2 023 303 2036 | Follow us on
 Description: cid:image001.gif@01D11A1D.D81CE0C0 |
 Description:
cid:image002.gif@01D11A1D.D81CE0C0 |
 Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 



[scottchu] Is it possible to create a new colr in Solr 5.5 using my old schema.xml and solrconfig.xml?

2016-03-28 Thread scott.chu
I have old schema.xml and solrconfig.xml from Solr 3.5. I want to rebuild the 
core structure in Solr 5.5. I got some questions to request for answer or 
suggestions:

1. Can I just put these 2 old xmls into the config folder and issue 
'bin\solr.cmd -c corename -d config folder path' to build a Solr 5.5 core? If 
not, what modification should I make?
(Note: AFAIK, MainIndex and IndexDefaults are replaced IndexConfig and no 
long exist in new solrconfig.xml. Besides, there're no any schema.xmls in Solr 
5.5's examples.)
2. What should I put in that config folder? Are they same as in Solr 3.5's?
3. Is there any special rules where I put the config folder? For example, Do I 
have to put that folder under solr-5.5.0\server\solr\configsets? Is this path 
must be relative to Solr home folder?
4. If the core is created ok, where is the the core folder that Solr has built?
5. Is creating core with schema.xml achievable via admin UI?

Thanks for help in advance!

scott.chu,scott@udngroup.com
2016/3/28 (週一)

P.S. Thanks to Reth RM's reply to my another post(How to rebuild master-slave 
multi-core with schema.xmlfrom old verison in Solr 5.5). I know I can just put 
replicationHanlder into new solrconfig.xml but still need a try.


Re: scottchu] How to rebuild master-slave multi-core with schema.xml from old verison in Solr 5.5

2016-03-28 Thread Reth RM
Hi Scott,

It is same as how we would do in earlier versions of solr.

On the master instance, include the replication handler definition with
master configs(as shown below).
  optimize optimize 
schema.xml,stopwords.txt,elevate.xml  

And on the slave instance, add the master url under slave config:


 
http://localhost:8983/solr/techproducts/replication 00:00:20  

Documentation is here
https://cwiki.apache.org/confluence/display/solr/Index+Replication



On Mon, Mar 28, 2016 at 8:19 AM, scott.chu  wrote:

>
> I post a question "How to rebuild master-slave multi-core with schema.xml
> from old verison in Solr 5.5" on stackoverflow. Hoping some expericnes solr
> people can reply me with a suggestive answer. The url is:
> http://stackoverflow.com/questions/36254855/how-to-rebuild-master-slave-multi-core-with-schema-xml-from-old-verison-in-solr
>
> scott.chu,scott@udngroup.com
> 2016/3/28 (週一)
>