Re: Understanding the MoreLikeThis Handler

2015-06-22 Thread Sreekant Sreedharan
Also, in the documentation it says:

/MoreLikeThis constructs a lucene query based on terms within a document.
For best results, use stored TermVectors in the schema.xml for fields you
will use for similarity.

If termVectors are not stored, MoreLikeThis will generate terms from stored
fields. 
/

Does this mean that if a field is not declared as a termVector, it wont be
recognized by the MLT handler? What specifically does 'stored fields' mean
when you say MoreLikeThis defaults to it if termVectors are not defined?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Understanding-the-MoreLikeThis-Handler-tp4213279p4213281.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Understanding the MoreLikeThis Handler

2015-06-22 Thread Alessandro Benedetti
The syntax seems find to me.
One of the requirement for the MLT is to have the field(s) to use for the
processing to be stored ( if termVector is enabled better) .

Apparently from your snippets this is not your problem. Can you confirm you
have the field you are interested stored ( it seems so from your snippet) .

Another thing that comes to my mind is the minimum term frequency and
inverse document frequencies :

mlt.mintf
mlt.mindf

mlt.mintf

Minimum Term Frequency - the frequency below which terms will be ignored in
the source doc.

DEFAULT_MIN_TERM_FREQ = 2

mlt.mindf

Minimum Document Frequency - the frequency at which words will be ignored
which do not occur in at least this many docs.

DEFAULT_MIN_DOC_FREQ = 5

Pretty sure we found the killer .
The default is preventing you to find the proper matches  as your field is
not containing more than one occurrence for the relevant term.
The default will ignore the terms appearing less than 2 times in the field
and less then 5 docs in the corpus.

This is my example MLT and I am using it with a sample of your data and it
is working :
*Config : *

requestHandler name=/mlt class=solr.MoreLikeThisHandler
  lst name=defaults
str name=mlt.boosttrue/str
str name=mlt.qf
  title^2.0 description^1.5 content^0.5
/str
str name=mlt.fltitle,description,content/str
int name=mlt.mintf1/int
int name=mlt.mindf1/int
  /lst
/requestHandler

*Query :*

mlt?q=id:86C544948369405D822FA6FBE5EBD49Ewt=jsonindent=truemlt.match.include=true

*Result :*

{
  responseHeader:{
status:0,
QTime:1},
  match:{numFound:1,start:0,docs:[
  {
id:86C544948369405D822FA6FBE5EBD49E,
title:flirt}]
  },
  response:{numFound:3,start:0,docs:[
  {
id:86C544948364505D822FA6FBE5EBD49E,
title:flirt},
  {
id:86C532948364505D822FA6FBE5EBD49E,
title:flirt},
  {
id:864R2948364505D822FA6FBE5EBD49E,
title:flirt}]
  }}

Cheers

2015-06-22 16:24 GMT+01:00 Sreekant Sreedharan sreeka...@alamy.com:

 Also, in the documentation it says:

 /MoreLikeThis constructs a lucene query based on terms within a document.
 For best results, use stored TermVectors in the schema.xml for fields you
 will use for similarity.

 If termVectors are not stored, MoreLikeThis will generate terms from stored
 fields.
 /

 Does this mean that if a field is not declared as a termVector, it wont be
 recognized by the MLT handler? What specifically does 'stored fields' mean
 when you say MoreLikeThis defaults to it if termVectors are not defined?



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Understanding-the-MoreLikeThis-Handler-tp4213279p4213281.html
 Sent from the Solr - User mailing list archive at Nabble.com.




-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England


Re: Nested objects and map in Solr

2015-06-22 Thread Amadeo Asco
Thank you for your reply.

Some of my objects are not fully indexed. I have 121 objects with sub-objects 
and when querying with “*:*” only 81 are found. The objects are in Json format. 
I use Solr from within Riak.


On 22 Jun 2015, at 17:31, Alessandro Benedetti 
benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com wrote:

Join is not only query time related.
Join is the Solr approach to nested documents.
Block join and Query time join are 2 different strategies with different
pros and cons .
Basically :

Block Join :
- force you to follow a specific indexing strategy
- if you want to update a child you need to update the whole block ( parent
+children)
+ 4-5 times faster then query time join

Query Time Join
+ you can index the data how you want, even in different cores
+ you can update single children
- it is slow

What do you mean with strange indexes ?

Cheers

2015-06-22 11:28 GMT+01:00 Amadeo Asco 
a...@trifork.commailto:a...@trifork.com:

I have looked at the join but the problem isn’t with the query but on
indexing sub-objects (in some places called also nested objects). The best
documentation I have seen is http://yonik.com/solr-4-8-features/
but I am still getting very estrange indexes when I play with this
approach and others.

Cheers

On 22 Jun 2015, at 11:23, Alessandro Benedetti 
benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com
mailto:benedetti.ale...@gmail.com wrote:

I would suggest you to take a look to the Solr Join ( block and query time
join) .
This is what you are looking for.
Anyway, this request points out that the documentation is not good enough
to address people to Nested Objects problems.
Maybe this should highlight the need of improving that part of the
documentation.

Cheers

2015-06-22 9:57 GMT+01:00 Amadeo Asco 
a...@trifork.commailto:a...@trifork.commailto:
a...@trifork.commailto:a...@trifork.com:

Dear all,

I am starting with Solr and I cannot index map(key,values) or nested
objects in Solr. I have not been able to find a satisfactory answer online.
Please could anyone let me know where to find the full documentation of how
to index nested objects in Solr? Also how to index and reference in the
search melees in a map?

Example Json:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
surname:other}, values_ss:[red, blue”]}
{name_s:Cheetara, age_i:28, leader_b:false, content_type:
parentDocument,
_childDocuments_:[{name:1},{name:2},{name:3}]}

What about with:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
surname”:[“other”, “next]}, values_ss:[red, blue”]}

I look forward to hearing form you soon.

Thank you in advance,
Amadeo




--
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England




--
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England



Re: Auto-suggest in Solr

2015-06-22 Thread Alessandro Benedetti
Can any of our beloved super guru take a look to my mail ?
It could help Edwin as well :)

Cheers

2015-06-19 11:53 GMT+01:00 Alessandro Benedetti benedetti.ale...@gmail.com
:

 Actually the documentation is not clear enough.
 Let's try to understand this suggester.

 *Building*
 This suggester build a FST that it will use to provide the autocomplete
 feature running prefix searches on it .
 The terms it uses to generate the FST are the tokens produced by the
  suggestFreeTextAnalyzerFieldType .

 And this should be correct.
 So if we have a shingle token filter[1-3] ( we produce unigrams as well)
 in our analysis to keep it simple , from these original field values :
 mp3 ipod
 mp3 player
 mp3 player ipod
 player of Real

 - we produce these list of possible suggestions in our FST :

 mp3
 player
 ipod
 real
 of

 mp3 ipod
 mp3 player
 player ipod
 player of
 of real

 mp3 player ipod
 player of real

 From the documentation I read :

  ngrams: The max number of tokens out of which singles will be make the
 dictionary. The default value is 2. Increasing this would mean you want
 more than the previous 2 tokens to be taken into consideration when making
 the suggestions. 


 This makes me confused, as I was not expecting this param to affect the
 suggestion dictionary.
 So I would like a clarification here from our masters :)
 At this point let's see what happens at query time .

 *Query Time *
 As my understanding the ngrams params will consider  the last N-1 tokens
 the user put separated by the space separator.

 Builds an ngram model from the text sent to {@link
 * #build} and predicts based on the last grams-1 tokens in
 * the request sent to {@link #lookup}. This tries to
 * handle the long tail of suggestions for when the
 * incoming query is a never before seen query string.


 Example , grams=3 should consider only the last 2 tokens

 special mp3 p - mp3 p

 Then this query is analysed using the suggestFreeTextAnalyzerFieldType .
 We produce 3 tokens :
 mp3
 p
 mp3 p

 And we run the prefix matching on the FST .

 *Conclusion*
 My understanding is wrong for sure at some point, as the behaviour I get
 is different.
 Can we discuss this , clarify this and eventually put it in the official
 documentation ?

 Cheers

 2015-06-19 6:40 GMT+01:00 Zheng Lin Edwin Yeo edwinye...@gmail.com:

 I'm implementing an auto-suggest feature in Solr, and I'll like to achieve
 the follwing:

 For example, if the user enters mp3, Solr might suggest mp3 player,
 mp3 nano and mp3 music.
 When the user enters mp3 p, the suggestion should narrow down to mp3
 player.

 Currently, when I type mp3 p, the suggester is returning words that
 starts with the letter p only, and I'm getting results like plan,
 production, etc, and it does not take the mp3 token into
 consideration.

 I'm using Solr 5.1 and below is my configuration:

 In solrconfig.xml:

 searchComponent name=suggest class=solr.SuggestComponent
   lst name=suggester

  str name=lookupImplFreeTextLookupFactory/str
  str name=indexPathsuggester_freetext_dir/str

 str name=dictionaryImplDocumentDictionaryFactory/str
 str name=fieldSuggestion/str
 str name=weightFieldProject/str
 str name=suggestFreeTextAnalyzerFieldTypesuggestType/str
 int name=ngrams5/int
 str name=buildOnStartupfalse/str
 str name=buildOnCommitfalse/str
   /lst
 /searchComponent


 In schema.xml

 fieldType name=suggestType class=solr.TextField
 positionIncrementGap=100
 analyzer type=index
 charFilter class=solr.PatternReplaceCharFilterFactory
 pattern=[^a-zA-Z0-9] replacement=  /
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.ShingleFilterFactory minShingleSize=2
 maxShingleSize=6 outputUnigrams=false/
 /analyzer
 analyzer type=query
 charFilter class=solr.PatternReplaceCharFilterFactory
 pattern=[^a-zA-Z0-9] replacement=  /
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.ShingleFilterFactory minShingleSize=2
 maxShingleSize=6 outputUnigrams=true/
 /analyzer
 /fieldType


 Is there anything that I configured wrongly?


 Regards,
 Edwin




 --
 --

 Benedetti Alessandro
 Visiting card : http://about.me/alessandro_benedetti

 Tyger, tyger burning bright
 In the forests of the night,
 What immortal hand or eye
 Could frame thy fearful symmetry?

 William Blake - Songs of Experience -1794 England




-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England


Re: Nested objects and map in Solr

2015-06-22 Thread Alessandro Benedetti
Join is not only query time related.
Join is the Solr approach to nested documents.
Block join and Query time join are 2 different strategies with different
pros and cons .
Basically :

Block Join :
- force you to follow a specific indexing strategy
- if you want to update a child you need to update the whole block ( parent
+children)
+ 4-5 times faster then query time join

Query Time Join
+ you can index the data how you want, even in different cores
+ you can update single children
- it is slow

What do you mean with strange indexes ?

Cheers

2015-06-22 11:28 GMT+01:00 Amadeo Asco a...@trifork.com:

 I have looked at the join but the problem isn’t with the query but on
 indexing sub-objects (in some places called also nested objects). The best
 documentation I have seen is http://yonik.com/solr-4-8-features/
 but I am still getting very estrange indexes when I play with this
 approach and others.

 Cheers

 On 22 Jun 2015, at 11:23, Alessandro Benedetti benedetti.ale...@gmail.com
 mailto:benedetti.ale...@gmail.com wrote:

 I would suggest you to take a look to the Solr Join ( block and query time
 join) .
 This is what you are looking for.
 Anyway, this request points out that the documentation is not good enough
 to address people to Nested Objects problems.
 Maybe this should highlight the need of improving that part of the
 documentation.

 Cheers

 2015-06-22 9:57 GMT+01:00 Amadeo Asco a...@trifork.commailto:
 a...@trifork.com:

 Dear all,

 I am starting with Solr and I cannot index map(key,values) or nested
 objects in Solr. I have not been able to find a satisfactory answer online.
 Please could anyone let me know where to find the full documentation of how
 to index nested objects in Solr? Also how to index and reference in the
 search melees in a map?

 Example Json:
 {name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
 surname:other}, values_ss:[red, blue”]}
 {name_s:Cheetara, age_i:28, leader_b:false, content_type:
 parentDocument,
 _childDocuments_:[{name:1},{name:2},{name:3}]}

 What about with:
 {name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
 surname”:[“other”, “next]}, values_ss:[red, blue”]}

 I look forward to hearing form you soon.

 Thank you in advance,
 Amadeo




 --
 --

 Benedetti Alessandro
 Visiting card : http://about.me/alessandro_benedetti

 Tyger, tyger burning bright
 In the forests of the night,
 What immortal hand or eye
 Could frame thy fearful symmetry?

 William Blake - Songs of Experience -1794 England




-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England


Understanding the MoreLikeThis Handler

2015-06-22 Thread Sreekant Sreedharan
 I am trying to implement a search for documents with similar texts like a
sample document. I assumed that the SOLR MoreLikeThis handler would suit me
well. 

I have been able to setup the handler and it seems to work. I have a core
called images2. And I have the following entry in my solrconfig.xml for this
particular core.

  requestHandler name=/mlt class=solr.MoreLikeThisHandler
  /requestHandler

This setup allows me to make the following query.
/solr/images2/mlt?q=id:86C544948369405D822FA6FBE5EBD49Emlt.fl=contributormlt.match.include=true

I am trying to tell SOLR to seach for all documents that are similar to the
document with id=86C544948369405D822FA6FBE5EBD49E, and I want to match
similars on the field contributor.

This is the result I get.

response
lst name=responseHeader
   int name=status0/intint name=QTime0/int
/lst
result name=match numFound=1 start=0
doc
str name=id86C544948369405D822FA6FBE5EBD49E/str
str name=arEEJ6PJ/strstr name=captionCommuters in Subway
Car/str
 
 str name=contributorid3FED3D3D18F84362A53C91700E1807BF/str
 str name=contributorFlirt/str

/doc
/result
result name=response numFound=0 start=0/
/response


So here are my questions:
1. Is my query right for what I want to do? Namely: seach for all documents
that are similar to the document with id=86C544948369405D822FA6FBE5EBD49E,
and match similars on the field contributor. If now, how do I encode it?

2. I know that there are several documents with the exact term 'Flirt' in
the contributor field. But I seem to be always getting only one result. I
tested the following SOLR query:

http://localhost:8983/solr/images2/select?q=*:*wt=xmlfq=contributor:Flirt

And this returns 1138 results. So why is the MLT not returning atleast these
results, which are identical matches?






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Understanding-the-MoreLikeThis-Handler-tp4213279.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Replication as backup in SolrCloud

2015-06-22 Thread Erick Erickson
Currently, one is best off treating these as two separate clusters and
having your client send the data to both, or reproducing your
system-of-record and running your DCs completely separately.

Hopefully soon, though, there'll be what you're asking for
active/passive DCs, see:
https://issues.apache.org/jira/browse/SOLR-6273

Best,
Erick

On Mon, Jun 22, 2015 at 10:16 AM, StrW_dev r.j.bamb...@structweb.nl wrote:
 Hi,

 I have a SolrCloud cluster in one data center, but as backup I want to have
 a second (replicated) cluster in another data center.

 What I want is to replicate to this second cluster, but I don't want my
 queries to go to this cluster. Is this possible within SolrCloud? As now it
 seems to replicate, but also distribute the query request to this replicated
 server.

 Gr



 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Replication-as-backup-in-SolrCloud-tp4213267.html
 Sent from the Solr - User mailing list archive at Nabble.com.


RE: Connecting to a Solr server remotely

2015-06-22 Thread Garth Grimm
Check the firewall settings on the Linux machine.

By default, mine block port 8983, so the request never even gets to Jetty/Solr.

-Original Message-
From: Paden [mailto:rumsey...@gmail.com] 
Sent: Monday, June 22, 2015 2:48 PM
To: solr-user@lucene.apache.org
Subject: Connecting to a Solr server remotely

Hello, 

I've set up a Solr server on my Linux Virtual Machine. Now I'm trying to access 
it remotely on my Windows Machine using an http request from a browser. 

Any time I try to access it with a request such as http//localhost:8983/solr 
I always get a connection error (with the server running on the linux virtual 
machine, it's not a because I forgot to turn the service on) I know that my 
server is probably set to take requests specifically from my virtual machine so 
I need to change that.  

From the several hours of research I've done on the web it seems like I need 
to change jetty.xml in the /etc/jetty directory. But others suggest I need to 
make a change to solr.config itself. There's a lot of conflicting info and 
it's pretty much got me randomly changing things in jetty.xml and solr.config 
and nothing's worked as of yet. 

If anybody has any idea how to get this to work I would greatly appreciate it. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Connecting-to-a-Solr-server-remotely-tp4213335.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Connecting to a Solr server remotely

2015-06-22 Thread Shawn Heisey
On 6/22/2015 1:48 PM, Paden wrote:
 I've set up a Solr server on my Linux Virtual Machine. Now I'm trying to
 access it remotely on my Windows Machine using an http request from a
 browser. 

 Any time I try to access it with a request such as
 http//localhost:8983/solr I always get a connection error (with the server

If you're trying to access it remotely, you can't use localhost.  That
will access the local Windows machine, not the remote Linux machine. 
Use the IP address or DNS hostname of the actual machine that's running
Solr.  Make sure that the Linux machine either has the firewall turned
off or has an access rule configured in the firewall to allow the Solr
port through.

Thanks,
Shawn



Re: Connecting to a Solr server remotely

2015-06-22 Thread Paden
That did it Shawn. Thanks for the help! 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Connecting-to-a-Solr-server-remotely-tp4213335p4213343.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr standalone + SSL and basic auth

2015-06-22 Thread Fadi Mohsen
Hi, I managed wiring up jetty and Solr war programmatically.

After seeing SOLR-4470 (issues with inter cluster/node client calls), we
now set:
HttpClientUtil.setConfigurer(new MyCustomHttpClientConfigurer());
to setup clients before doing any inter node calls.

also combined with:
jettywebapp.setParentLoaderPriority(true)
which means that application and war uses same classpath.

all good so far, uploading configuration and creating collections works.
But, when quering the collection, responses numFound vary for each response.
guessing that something is preventing solr from collecting proper answer
from collection (all shards).

We see these warnings in Solr logs:

INFO  qtp678433396-57 update.PeerSync [Solr_335] [] PeerSync:
core=test_o_txs_shard1_replica2 url=https://host1:9232/solr START replicas=[
https://host3:9232/solr/test_o_txs_shard1_replica3/] nUpdates=100
INFO  qtp678433396-57 update.PeerSync [Solr_335] [] PeerSync:
core=test_o_txs_shard1_replica2 url=https://host1:9232/solr DONE.  We have
no versions.  sync failed.
INFO  RecoveryThread-test_o_txs_shard4_replica3 cloud.RecoveryStrategy
[Solr_335] [] Attempting to PeerSync from
https://host2:9232/solr/test_o_txs_shard4_replica1/
core=test_o_txs_shard4_replica3 - recoveringAfterStartup=true
INFO  RecoveryThread-test_o_txs_shard4_replica3 update.PeerSync [Solr_335]
[] PeerSync: core=test_o_txs_shard4_replica3 url=https://host1:9232/solr
START replicas=[https://host2:9232/solr/test_o_txs_shard4_replica1/]
nUpdates=100
WARN  RecoveryThread-test_o_txs_shard4_replica3 update.PeerSync [Solr_335]
[] no frame of reference to tell if we've missed updates
INFO  RecoveryThread-test_o_txs_shard4_replica3 cloud.RecoveryStrategy
[Solr_335] [] PeerSync Recovery was not successful - trying replication.
core=test_o_txs_shard4_replica3
INFO  RecoveryThread-test_o_txs_shard3_replica1 cloud.RecoveryStrategy
[Solr_335] [] Attempting to PeerSync from
https://host3:9232/solr/test_o_txs_shard3_replica2/
core=test_o_txs_shard3_replica1 - recoveringAfterStartup=true
INFO  RecoveryThread-test_o_txs_shard3_replica1 update.PeerSync [Solr_335]
[] PeerSync: core=test_o_txs_shard3_replica1 url=https://host1:9232/solr
START replicas=[https://host3:9232/solr/test_o_txs_shard3_replica2/]
nUpdates=100
WARN  RecoveryThread-test_o_txs_shard3_replica1 update.PeerSync [Solr_335]
[] no frame of reference to tell if we've missed updates
INFO  RecoveryThread-test_o_txs_shard3_replica1 cloud.RecoveryStrategy
[Solr_335] [] PeerSync Recovery was not successful - trying replication.
core=test_o_txs_shard3_replica1

any hints?

Regards
/Fadi


Re: Nested objects and map in Solr

2015-06-22 Thread Amadeo Asco
I have looked at the join but the problem isn’t with the query but on indexing 
sub-objects (in some places called also nested objects). The best documentation 
I have seen is http://yonik.com/solr-4-8-features/
but I am still getting very estrange indexes when I play with this approach and 
others.

Cheers

On 22 Jun 2015, at 11:23, Alessandro Benedetti 
benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com wrote:

I would suggest you to take a look to the Solr Join ( block and query time
join) .
This is what you are looking for.
Anyway, this request points out that the documentation is not good enough
to address people to Nested Objects problems.
Maybe this should highlight the need of improving that part of the
documentation.

Cheers

2015-06-22 9:57 GMT+01:00 Amadeo Asco 
a...@trifork.commailto:a...@trifork.com:

Dear all,

I am starting with Solr and I cannot index map(key,values) or nested
objects in Solr. I have not been able to find a satisfactory answer online.
Please could anyone let me know where to find the full documentation of how
to index nested objects in Solr? Also how to index and reference in the
search melees in a map?

Example Json:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
surname:other}, values_ss:[red, blue”]}
{name_s:Cheetara, age_i:28, leader_b:false, content_type:
parentDocument,
_childDocuments_:[{name:1},{name:2},{name:3}]}

What about with:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
surname”:[“other”, “next]}, values_ss:[red, blue”]}

I look forward to hearing form you soon.

Thank you in advance,
Amadeo




--
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England



Re: Sorting documents by nested / child docs with FunctionQueries

2015-06-22 Thread Maya G
I've tried your solution and encountered a problem.

My child document has a multi-valued field. 

When I query the doc by its' guid, all of the field's values are returned.
When I use the join block query only one value is returned for the
multi-value field.

Do you have any suggestions?
Thank you,
Maya



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Sorting-documents-by-nested-child-docs-with-FunctionQueries-tp4209940p4213242.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Nested objects and map in Solr

2015-06-22 Thread Alessandro Benedetti
I would suggest you to take a look to the Solr Join ( block and query time
join) .
This is what you are looking for.
Anyway, this request points out that the documentation is not good enough
to address people to Nested Objects problems.
Maybe this should highlight the need of improving that part of the
documentation.

Cheers

2015-06-22 9:57 GMT+01:00 Amadeo Asco a...@trifork.com:

 Dear all,

 I am starting with Solr and I cannot index map(key,values) or nested
 objects in Solr. I have not been able to find a satisfactory answer online.
 Please could anyone let me know where to find the full documentation of how
 to index nested objects in Solr? Also how to index and reference in the
 search melees in a map?

 Example Json:
 {name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
 surname:other}, values_ss:[red, blue”]}
 {name_s:Cheetara, age_i:28, leader_b:false, content_type:
 parentDocument,
 _childDocuments_:[{name:1},{name:2},{name:3}]}

 What about with:
 {name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
 surname”:[“other”, “next]}, values_ss:[red, blue”]}

 I look forward to hearing form you soon.

 Thank you in advance,
 Amadeo




-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England


Nested objects in Solr

2015-06-22 Thread Amadeo Asco
Dear Sir/Madam,

I am starting with Solr and I cannot index nested objects in Solr. I have not 
been able to find a satisfactory answer online. Please could you let me know 
where a full documentation of how to index nested objects in Solr can be found? 
Do I need to change the schema? How?

I look forward to hearing form you soon.

Thank you in advance,
Amadeo

Loading custom codec and SPI problem

2015-06-22 Thread Markus Jelsma
Hi - i've created a small Maven project with just a custom Lucene 4.3 codec. It 
is a basic MyCodec extends FilterCodec implementation, disabling compression. I 
have added the FQCN to the 
src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec. I have 
checked the jar itself to see if the file is actually there, it is. However, i 
cannot load the codec, although the jar is actually loaded. When configuring it 
in solrconfig.xml as CodecFactory, i get 

org.apache.solr.common.SolrException: class org.example.MyCodec
    at org.apache.solr.core.SolrCore.init(SolrCore.java:822)
    at org.apache.solr.core.SolrCore.init(SolrCore.java:618)
    at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
    at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
    at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: class org.example.MyCodec
    at java.lang.Class.asSubclass(Class.java:3397)
    at 
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
    at 
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:486)
    at 
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:482)
    at org.apache.solr.core.SolrCore.initCodec(SolrCore.java:847)
    at org.apache.solr.core.SolrCore.init(SolrCore.java:734)
    ... 11 more
3144 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer  – 
null:org.apache.solr.common.SolrException: Unable to create core: collection1
    at 
org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
    at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
    at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: class org.example.MyCodec
    at org.apache.solr.core.SolrCore.init(SolrCore.java:822)
    at org.apache.solr.core.SolrCore.init(SolrCore.java:618)
    at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
    ... 8 more
Caused by: java.lang.ClassCastException: class org.example.MyCodec
    at java.lang.Class.asSubclass(Class.java:3397)
    at 
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
    at 
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:486)
    at 
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:482)
    at org.apache.solr.core.SolrCore.initCodec(SolrCore.java:847)
    at org.apache.solr.core.SolrCore.init(SolrCore.java:734)
    ... 11 more

I also cannot load the codec as postingsFormat=MyCodec on a field type 
definition. Then i get a 

Caused by: java.lang.IllegalArgumentException: A SPI class of type 
org.apache.lucene.codecs.PostingsFormat with name 'MyCodec' does not exist. You 
need to add the corresponding JAR file supporting this SPI to your 
classpath.The current classpath supports the following names: [Lucene40, 
Lucene41, Pulsing41, SimpleText, Memory, BloomFilter, Direct]
    at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:111)
    at 
org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:100)
    at 
org.apache.solr.core.SchemaCodecFactory$1.getPostingsFormatForField(SchemaCodecFactory.java:55)
    at 
org.apache.lucene.codecs.lucene42.Lucene42Codec$1.getPostingsFormatForField(Lucene42Codec.java:59)
    at 
org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsWriter.addField(PerFieldPostingsFormat.java:102)
    at 
org.apache.lucene.index.FreqProxTermsWriterPerField.flush(FreqProxTermsWriterPerField.java:336)
    at 

Nested objects and map in Solr

2015-06-22 Thread Amadeo Asco
Dear all,

I am starting with Solr and I cannot index map(key,values) or nested objects in 
Solr. I have not been able to find a satisfactory answer online. Please could 
anyone let me know where to find the full documentation of how to index nested 
objects in Solr? Also how to index and reference in the search melees in a map?

Example Json:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name:me, 
surname:other}, values_ss:[red, blue”]}
{name_s:Cheetara, age_i:28, leader_b:false, content_type: 
parentDocument, _childDocuments_:[{name:1},{name:2},{name:3}]}

What about with:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”], 
surname”:[“other”, “next]}, values_ss:[red, blue”]}

I look forward to hearing form you soon.

Thank you in advance,
Amadeo


Re: Solr standalone + SSL and basic auth

2015-06-22 Thread Anshum Gupta
Hi,

Can you provide with more context? Solr doesn't officially support the
'war' (Web application ARchive) any more.

What version of Solr is this? What are you trying to accomplish? Also, the
patches on SOLR-4460 are from over an year ago.

On Mon, Jun 22, 2015 at 5:22 AM, Fadi Mohsen fadi.moh...@gmail.com wrote:

 Create collection :


 /solr/admin/collections?action=CREATEname=${collectionName}numShards=5replicationFactor=3maxShardsPerNode=3

 On Mon, Jun 22, 2015 at 12:56 PM, Fadi Mohsen fadi.moh...@gmail.com
 wrote:

  Hi, I managed wiring up jetty and Solr war programmatically.
 
  After seeing SOLR-4470 (issues with inter cluster/node client calls), we
  now set:
  HttpClientUtil.setConfigurer(new MyCustomHttpClientConfigurer());
  to setup clients before doing any inter node calls.
 
  also combined with:
  jettywebapp.setParentLoaderPriority(true)
  which means that application and war uses same classpath.
 
  all good so far, uploading configuration and creating collections works.
  But, when quering the collection, responses numFound vary for each
  response.
  guessing that something is preventing solr from collecting proper answer
  from collection (all shards).
 
  We see these warnings in Solr logs:
 
  INFO  qtp678433396-57 update.PeerSync [Solr_335] [] PeerSync:
  core=test_o_txs_shard1_replica2 url=https://host1:9232/solr START
  replicas=[https://host3:9232/solr/test_o_txs_shard1_replica3/]
  nUpdates=100
  INFO  qtp678433396-57 update.PeerSync [Solr_335] [] PeerSync:
  core=test_o_txs_shard1_replica2 url=https://host1:9232/solr DONE.  We
  have no versions.  sync failed.
  INFO  RecoveryThread-test_o_txs_shard4_replica3 cloud.RecoveryStrategy
  [Solr_335] [] Attempting to PeerSync from
  https://host2:9232/solr/test_o_txs_shard4_replica1/
  core=test_o_txs_shard4_replica3 - recoveringAfterStartup=true
  INFO  RecoveryThread-test_o_txs_shard4_replica3 update.PeerSync
 [Solr_335]
  [] PeerSync: core=test_o_txs_shard4_replica3 url=https://host1:9232/solr
  START replicas=[https://host2:9232/solr/test_o_txs_shard4_replica1/]
  nUpdates=100
  WARN  RecoveryThread-test_o_txs_shard4_replica3 update.PeerSync
 [Solr_335]
  [] no frame of reference to tell if we've missed updates
  INFO  RecoveryThread-test_o_txs_shard4_replica3 cloud.RecoveryStrategy
  [Solr_335] [] PeerSync Recovery was not successful - trying replication.
  core=test_o_txs_shard4_replica3
  INFO  RecoveryThread-test_o_txs_shard3_replica1 cloud.RecoveryStrategy
  [Solr_335] [] Attempting to PeerSync from
  https://host3:9232/solr/test_o_txs_shard3_replica2/
  core=test_o_txs_shard3_replica1 - recoveringAfterStartup=true
  INFO  RecoveryThread-test_o_txs_shard3_replica1 update.PeerSync
 [Solr_335]
  [] PeerSync: core=test_o_txs_shard3_replica1 url=https://host1:9232/solr
  START replicas=[https://host3:9232/solr/test_o_txs_shard3_replica2/]
  nUpdates=100
  WARN  RecoveryThread-test_o_txs_shard3_replica1 update.PeerSync
 [Solr_335]
  [] no frame of reference to tell if we've missed updates
  INFO  RecoveryThread-test_o_txs_shard3_replica1 cloud.RecoveryStrategy
  [Solr_335] [] PeerSync Recovery was not successful - trying replication.
  core=test_o_txs_shard3_replica1
 
  any hints?
 
  Regards
  /Fadi
 




-- 
Anshum Gupta


Re: Solr standalone + SSL and basic auth

2015-06-22 Thread Fadi Mohsen
Hi, I didnt apply SOLR-4460, I use Solr 5.1.0 and I can see same issue in
log when it comes to gettingstarted example:
no frame of reference to tell if we've missed updates, so that warn is
execused.

Issue now is getting sporadic answers for numFound when doing a plain
select, seem like its quering one shard only each time.

creating the collection:
/solr/admin/collections?action=CREATEname=txsnumShards=2replicationFactor=2

here are the two responses, one time numFound is 29 another is 28:

  response: {
numFound: 29,
start: 0,
maxScore: 1,
docs: []
  },
  debug: {
track: {
  rid: -txs_shard1_replica2-1435005201041-5,
  EXECUTE_QUERY: {

https://host1:9232/solr/txs_shard1_replica1/|https://host2:9232/solr/txs_shard1_replica2/:
{
  QTime: 0,
  ElapsedTime: 7,
  RequestPurpose: GET_TOP_IDS,
  NumFound: 1,
  Response:
{responseHeader={status=0,QTime=0,params={df=transactionId,distrib=false,preferLocalShards=false,debug=[false,
timing, track],fl=[transactionId,
score],shards.purpose=4,start=0,fsv=true,shard.url=
https://host1:9232/solr/txs_shard1_replica1/|https://host2:9232/solr/txs_shard1_replica2/,rows=0,rid=-txs_shard1_replica2-1435005201041-5,version=2,q=*:*,requestPurpose=GET_TOP_IDS,NOW=1435005201041,isShard=true,wt=javabin,debugQuery=false,_=1435005200744}
},response={numFound=1,start=0,maxScore=1.0,docs=[]},sort_values={},debug={timing={time=0.0,prepare={time=0.0,query={time=0.0},facet={time=0.0},facet_module={time=0.0},mlt={time=0.0},highlight={time=0.0},stats={time=0.0},expand={time=0.0},debug={time=0.0}},process={time=0.0,query={time=0.0},facet={time=0.0},facet_module={time=0.0},mlt={time=0.0},highlight={time=0.0},stats={time=0.0},expand={time=0.0},debug={time=0.0}
},

https://host3:9232/solr/txs_shard2_replica1/|https://host4:9232/solr/txs_shard2_replica2/:
{
  QTime: 1,
  ElapsedTime: 10,
  RequestPurpose: GET_TOP_IDS,
  NumFound: 28,
  Response:
{responseHeader={status=0,QTime=1,params={df=transactionId,distrib=false,preferLocalShards=false,debug=[false,
timing, track],fl=[transactionId,
score],shards.purpose=4,start=0,fsv=true,shard.url=
https://host3:9232/solr/txs_shard2_replica1/|https://host4:9232/solr/txs_shard2_replica2/,rows=0,rid=-txs_shard1_replica2-1435005201041-5,version=2,q=*:*,requestPurpose=GET_TOP_IDS,NOW=1435005201041,isShard=true,wt=javabin,debugQuery=false,_=1435005200744}
},response={numFound=28,start=0,maxScore=1.0,docs=[]},sort_values={},debug={timing={time=1.0,prepare={time=1.0,query={time=1.0},facet={time=0.0},facet_module={time=0.0},mlt={time=0.0},highlight={time=0.0},stats={time=0.0},expand={time=0.0},debug={time=0.0}},process={time=0.0,query={time=0.0},facet={time=0.0},facet_module={time=0.0},mlt={time=0.0},highlight={time=0.0},stats={time=0.0},expand={time=0.0},debug={time=0.0}
}
  }
},


another time:

  response: {
numFound: 28,
start: 0,
maxScore: 1,
docs: []
  },
  debug: {
track: {
  rid: -txs_shard1_replica2-1435005267017-6,
  EXECUTE_QUERY: {

https://host1:9232/solr/txs_shard1_replica1/|https://host2:9232/solr/txs_shard1_replica2/:
{
  QTime: 1,
  ElapsedTime: 5,
  RequestPurpose: GET_TOP_IDS,
  NumFound: 1,
  Response:
{responseHeader={status=0,QTime=1,params={df=transactionId,distrib=false,preferLocalShards=false,debug=[false,
timing, track],fl=[transactionId,
score],shards.purpose=4,start=0,fsv=true,shard.url=
https://host1:9232/solr/txs_shard1_replica1/|https://host2:9232/solr/txs_shard1_replica2/,rows=0,rid=-txs_shard1_replica2-1435005267017-6,version=2,q=*:*,requestPurpose=GET_TOP_IDS,NOW=1435005267017,isShard=true,wt=javabin,debugQuery=false,_=1435005266725}
},response={numFound=1,start=0,maxScore=1.0,docs=[]},sort_values={},debug={timing={time=1.0,prepare={time=1.0,query={time=1.0},facet={time=0.0},facet_module={time=0.0},mlt={time=0.0},highlight={time=0.0},stats={time=0.0},expand={time=0.0},debug={time=0.0}},process={time=0.0,query={time=0.0},facet={time=0.0},facet_module={time=0.0},mlt={time=0.0},highlight={time=0.0},stats={time=0.0},expand={time=0.0},debug={time=0.0}
},

https://host3:9232/solr/txs_shard2_replica1/|https://host4:9232/solr/txs_shard2_replica2/:
{
  QTime: 5,
  ElapsedTime: 8,
  RequestPurpose: GET_TOP_IDS,
  NumFound: 27,
  Response:
{responseHeader={status=0,QTime=5,params={df=transactionId,distrib=false,preferLocalShards=false,debug=[false,
timing, track],fl=[transactionId,
score],shards.purpose=4,start=0,fsv=true,shard.url=
https://host3:9232/solr/txs_shard2_replica1/|https://host4:9232/solr/txs_shard2_replica2/,rows=0,rid=-txs_shard1_replica2-1435005267017-6,version=2,q=*:*,requestPurpose=GET_TOP_IDS,NOW=1435005267017,isShard=true,wt=javabin,debugQuery=false,_=1435005266725}

Connecting to a Solr server remotely

2015-06-22 Thread Paden
Hello, 

I've set up a Solr server on my Linux Virtual Machine. Now I'm trying to
access it remotely on my Windows Machine using an http request from a
browser. 

Any time I try to access it with a request such as
http//localhost:8983/solr I always get a connection error (with the server
running on the linux virtual machine, it's not a because I forgot to turn
the service on) I know that my server is probably set to take requests
specifically from my virtual machine so I need to change that.  

From the several hours of research I've done on the web it seems like I need
to change jetty.xml in the /etc/jetty directory. But others suggest I need
to make a change to solr.config itself. There's a lot of conflicting info
and it's pretty much got me randomly changing things in jetty.xml and
solr.config and nothing's worked as of yet. 

If anybody has any idea how to get this to work I would greatly appreciate
it. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Connecting-to-a-Solr-server-remotely-tp4213335.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Connecting to a Solr server remotely

2015-06-22 Thread Paden
I checked to see if the firewall rules were blocking it and there were no
rules enabled and just to be sure I turned off the firewall completely and
it's still being blocked but I did get a message with netstat that might
help. 

tcp6   0  0 :::8983 :::*LISTEN 




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Connecting-to-a-Solr-server-remotely-tp4213335p4213342.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr Exact match boost Reduce the results

2015-06-22 Thread JACK
Hi  Alessandro Benedetti,

I have changed the query like this.

/select?q=(dell+laptop~13+OR+dell+laptop)df=product_namedefType=edismaxqf=product_name^0.001+dummy_product_name^2fl=product_namewt=jsonindent=truedebug=true

The corresponding results also given in the below link.Now am getting exact
match first.

http://pastebin.com/rAYrFiB8


Now the problem is Look at the 8th result 
product_name:Dell Inspiron 15R 15.6-inch Laptop without Laptop Bag by
Dell, its not a relevant result
can you check How this happens , check the scores. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Exact-match-boost-Reduce-the-results-tp4211352p4213382.html
Sent from the Solr - User mailing list archive at Nabble.com.


[ANNOUNCE] Book: Apache Solr Enterprise Search Server, Third Edition

2015-06-22 Thread david.w.smi...@gmail.com
Solr community,

David Smiley, Eric Pugh, Kranti Parisa, and Matt Mitchell are happy to
*finally* announce the book “Apache Sor Enterprise Search Server, Third
Edition” by Packt Publishing.  You can find links to buy it Packt’s site 
Amazon from our book’s official website:

 http://www.solrenterprisesearchserver.com

Preface:

If you are a developer building an application today, then you know how
important a good search experience is. Apache Solr, built on Apache Lucene,
is a wildly popular open source enterprise search server that easily
delivers the powerful search and faceted navigation features that are
elusive with databases. Solr supports complex search criteria, faceting,
result highlighting, query-completion, query spellcheck, relevancy tuning,
and more.

Apache Solr Enterprise Search Server, Third Edition is a comprehensive
resource to almost everything Solr has to offer. It serves the reader right
from initiation to development to deployment. It also comes with complete
running examples to demonstrate its use and show how to integrate Solr with
other languages and frameworks — even Hadoop.

By using a large set of metadata, including artists, releases, and tracks,
courtesy of the MusicBrainz.org project, you will have a testing ground for
Solr and will learn how to import this data in various ways. You will then
learn how to search this data in different ways, including Solr's rich
query syntax and boosting match scores based on record data. Finally, we'll
cover various deployment considerations to include indexing strategies and
performance-oriented configuration that will enable you to scale Solr to
meet the needs of a high-volume site.

Solr 4 or Solr 5?:

Apache Solr 4.8.1 is officially the version of Solr this book was written
for. Nonetheless, some of the features are discussed or referenced in the
later versions of Solr as far as 5.0. In fact, Chapter 1, Quick Starting
Solr, orients you to Solr 5, which has a different first-impression
experience than its predecessor. Once you get Solr running, you should be
able to follow along easily with Solr 5. In Chapter 10, Scaling Solr, there
are some SolrCloud startup commands that are a little different, and we've
pointed out how they change. The only substantial topic not covered in this
book that evolved through the Solr 4 point releases is data-driven
schemaless mode, and HTTP API calls to make schema changes.

How this edition has improved:

Solr 4 was Solr's biggest release ever. We updated the previous edition to
cover Solr 4, and some of Solr 5 -- particularly the part of Solr 5 that
needs to be covered most, the bin/solr script. Chapter 9, Integrating Solr,
now covers Hadoop integration, and better covers SolrJ. Chapter 3, Text
Analysis, introduces various approaches for implementing Multilingual
Search in your applications. And we think you'll appreciate the enhanced
coverage of the topic of query auto-suggesters (AKA query completion) in
Chapter 8, Search Components -- a feature that is important to most search
applications. This edition has two additional authors, Kranti  Matt, who
add their perspectives based on their experience working with Solr for a
long time.

Who this book is for:

This book is primarily for developers who want to learn how to use Apache
Solr in their applications. Only basic programming skills are assumed,
although the vast majority of content should be useful to those with a
solid technical foundation that have not yet programmed.

~ David Smiley, Eric Pugh, Kranti Parisa, and Matt Mitchell

http://www.solrenterprisesearchserver.com


Re: understanding collapsingQParser with facet vs group.facet

2015-06-22 Thread Joel Bernstein
The group head is the document from each group that was selected during the
collapse. Only the group heads remain in the result set following the
collapse. It looks like in the example above you have the basic idea
correct.

Joel Bernstein
http://joelsolr.blogspot.com/

On Sat, Jun 20, 2015 at 12:40 AM, Derek Poh d...@globalsources.com wrote:

 Hi Joel

 By group heads, is it referring to the document thatis use to represent
 each group in the main result section?

 Eg. Using the below 3 documentsandwe collapse on field supplier_id

 supplier_id:S1
 product_id:P1

 supplier_id:S2
 product_id:P2

 supplier_id:S2
 product_id:P3

 With collapse on supplier_id, the result in the main sectionis as follows,

 supplier_id:S1
 product_id:P1

 supplier_id:S2
 product_id:P3

 The group head of supplier_id:S1 is P1and supplier_id:S2 will be P3?

 Facets (and even sort) are calculated on P1 and P3?

 -Derek


 On 6/19/2015 7:05 PM, Joel Bernstein wrote:

 The CollapsingQParserPlugin currently doesn't calculate facets at all. It
 simply collapses the document set. The facets are then calculated only on
 the group heads.

 Grouping has special faceting code built into it that supports the
 group.facet functionality.

 Joel Bernstein
 http://joelsolr.blogspot.com/

 On Fri, Jun 19, 2015 at 6:20 AM, Derek Poh d...@globalsources.com
 wrote:

  Hi

 I read about collapsingQParser returns the facet count the same as
 group.truncate=true and has this issue with the facet count and the
 after
 filter facet count notthe same.
 Using group.facetdoes not has this issue but it's performance is very
 badcompared to collapsingQParser.

 I trying to understand why collapsingQParser behave this way and will
 need
 to explain to management.

 Can someone explain how collapsingQParser calculatethefacet
 countscompated
 to group.facet?

 Thank you,
 Derek







Re: Solr standalone + SSL and basic auth

2015-06-22 Thread Fadi Mohsen
Create collection :

/solr/admin/collections?action=CREATEname=${collectionName}numShards=5replicationFactor=3maxShardsPerNode=3

On Mon, Jun 22, 2015 at 12:56 PM, Fadi Mohsen fadi.moh...@gmail.com wrote:

 Hi, I managed wiring up jetty and Solr war programmatically.

 After seeing SOLR-4470 (issues with inter cluster/node client calls), we
 now set:
 HttpClientUtil.setConfigurer(new MyCustomHttpClientConfigurer());
 to setup clients before doing any inter node calls.

 also combined with:
 jettywebapp.setParentLoaderPriority(true)
 which means that application and war uses same classpath.

 all good so far, uploading configuration and creating collections works.
 But, when quering the collection, responses numFound vary for each
 response.
 guessing that something is preventing solr from collecting proper answer
 from collection (all shards).

 We see these warnings in Solr logs:

 INFO  qtp678433396-57 update.PeerSync [Solr_335] [] PeerSync:
 core=test_o_txs_shard1_replica2 url=https://host1:9232/solr START
 replicas=[https://host3:9232/solr/test_o_txs_shard1_replica3/]
 nUpdates=100
 INFO  qtp678433396-57 update.PeerSync [Solr_335] [] PeerSync:
 core=test_o_txs_shard1_replica2 url=https://host1:9232/solr DONE.  We
 have no versions.  sync failed.
 INFO  RecoveryThread-test_o_txs_shard4_replica3 cloud.RecoveryStrategy
 [Solr_335] [] Attempting to PeerSync from
 https://host2:9232/solr/test_o_txs_shard4_replica1/
 core=test_o_txs_shard4_replica3 - recoveringAfterStartup=true
 INFO  RecoveryThread-test_o_txs_shard4_replica3 update.PeerSync [Solr_335]
 [] PeerSync: core=test_o_txs_shard4_replica3 url=https://host1:9232/solr
 START replicas=[https://host2:9232/solr/test_o_txs_shard4_replica1/]
 nUpdates=100
 WARN  RecoveryThread-test_o_txs_shard4_replica3 update.PeerSync [Solr_335]
 [] no frame of reference to tell if we've missed updates
 INFO  RecoveryThread-test_o_txs_shard4_replica3 cloud.RecoveryStrategy
 [Solr_335] [] PeerSync Recovery was not successful - trying replication.
 core=test_o_txs_shard4_replica3
 INFO  RecoveryThread-test_o_txs_shard3_replica1 cloud.RecoveryStrategy
 [Solr_335] [] Attempting to PeerSync from
 https://host3:9232/solr/test_o_txs_shard3_replica2/
 core=test_o_txs_shard3_replica1 - recoveringAfterStartup=true
 INFO  RecoveryThread-test_o_txs_shard3_replica1 update.PeerSync [Solr_335]
 [] PeerSync: core=test_o_txs_shard3_replica1 url=https://host1:9232/solr
 START replicas=[https://host3:9232/solr/test_o_txs_shard3_replica2/]
 nUpdates=100
 WARN  RecoveryThread-test_o_txs_shard3_replica1 update.PeerSync [Solr_335]
 [] no frame of reference to tell if we've missed updates
 INFO  RecoveryThread-test_o_txs_shard3_replica1 cloud.RecoveryStrategy
 [Solr_335] [] PeerSync Recovery was not successful - trying replication.
 core=test_o_txs_shard3_replica1

 any hints?

 Regards
 /Fadi



Replication as backup in SolrCloud

2015-06-22 Thread StrW_dev
Hi,

I have a SolrCloud cluster in one data center, but as backup I want to have
a second (replicated) cluster in another data center. 

What I want is to replicate to this second cluster, but I don't want my
queries to go to this cluster. Is this possible within SolrCloud? As now it
seems to replicate, but also distribute the query request to this replicated
server.

Gr



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Replication-as-backup-in-SolrCloud-tp4213267.html
Sent from the Solr - User mailing list archive at Nabble.com.