Re: Required operator (+) is being ignored when using default conjunction operator AND

2020-04-11 Thread Eran Buchnick
Hoss, thanks a lot for the informative response. I understood my
misunderstanding with infix and prefix operators. Need to rethink about the
term occurrence support in my search service.

Cheers!

On Mon, Apr 6, 2020, 20:43 Chris Hostetter  wrote:

>
> : I red your attached blog post (and more) but still the penny hasn't
> dropped
> : yet about what causes the operator clash when the default operator is
> AND.
> : I red that when q.op=AND, OR will change the left(if not MUST_NOT) and
> : right clause Occurs to SHOULD - what that means is that the "order of
> : operations" in this case is giving the infix operator the mandate to
> : control the prefix operator?
>
> Not quite anything that complex... sorry, but the blog post was focused
> on
> describe *what* happens when parsing, do explain why mixng prefix/infix is
> bad ... i avoided getting bogged down into *why* it happens exactly the
> way it does.
>
>
> To get to the "why" you have to circle back to the higher level concept
> that the "prefix" operators very closely align to the underlying concepts
> of the BooleanQuery/BooleanClause data structures: that each clause has an
> "Occur" property which is either: MUST/SHOULD/MUST_NOT (or FILTER, but
> setting asside scoring that's functionally equivilent to MUST).
>
> The 'infix' operators just manipulate the Occur property of the clauses on
> either side of them.
>
> 'q.op=AND' and 'q.op=OR' are functionally really about setting the
> "Default Occur Value For All Clauses That Do Not Have An Explicit Occur
> Value" (ie: q.op=Occur.MUST and q.op=Occur.SHOULD) ... where the explicit
> Occur value for each clause would be specified by it's prefix (+=MUST,
> -=MUST_NOT ... there is no supported prefix for SHOULD, which is why
> q.op=SHOULD is the defualt nad chaning it complicates the parser logic)
>
> In essence: After the q.op/default.occur is applied to all clauses (that
> don't already have a prefix), then there is a left to right parsing that
> let's the infix operators modify the "Occur" values of the clauses on
> either side of them -- if those Occur values match the "default" for this
> parser.
>
> So let's imagine 2 requests...
>
> 1)  {!q.op=AND}a +b OR c +d AND e
> 2)  {!q.op=OR} x +y OR z +r AND s
>
> Here's what those wind up looking like internally with the default
> applied...
>
> 1) q.op=MUST:MUST(a)   MUST(b) OR MUST(c)   MUST(d) AND MUST(e)
> 2) q.op=SHOULD:  SHOULD(x) MUST(y) OR SHOULD(z) MUST(r) AND SHOULD(s)
>
> And here's how the infix operators change things as it parses left to
> right building up the clauses...
>
> 1) q.op=MUST:MUST(a)   SHOULD(b) SHOULD(c) MUST(d)  MUST(e)
> 2) q.op=SHOULD:  SHOULD(x) MUST(y)   SHOULD(z) MUST(r)  MUST(s)
>
> It's not actually done in "two passes" -- it's just that as the parsing
> is done left to right, the default Occur is used unless/until set by a
> prefix operators, and infix operators not only set the occur value
> for the "next" clause, but also reach back to override the prior
> Occur value if it matches the Default: because there is no "history" kept
> to indicate that it was explicitly set, or how.  the left to right parsing
> just does the best it can with the context it's got.
>
> :  A little background - I am trying to implement a google search like
> : service and want to have the ability to have required and prohibit
> : operators while still allowing default intersection operation as default
> : operator. How can I achieve this with this limitation?
>
> If you want "intersection" to be the defualt, i'm not sure why you care
> about having a "required" operator? (you didn't mention anything about an
> "optional" operator even though your original example explicitly used
> "OR" ... so not really sure if that was just a contrived example or if you
> actaully care about supporting it?
>
> If you're not hung up on using a specific syntax, you might want to
> consider the "simple" QParser -- it unfortunately re-uses the 'q.op=AND'
> param syntax to indicate what the default Occur should be for clauses, but
> the overall syntax is much simple: there is a prefix negation operator,
> but other wise the infix "+" and "|" operators support boolean AND and OR
> -- there is no prefix operators for MUST/SHOULD.  You can also turn off
> individual operators you don't like...
>
>
> https://lucene.apache.org/solr/guide/8_5/other-parsers.html#OtherParsers-SimpleQueryParser
>
>
> -Hoss
> http://www.lucidworks.com/
>


how to use multiple update process chain?

2020-04-11 Thread derrick cui
Hi, 
I need to do three tasks.1. add-unkown-fields-to-the-schema2. create composite 
key3. remove duplicate for specified field
I defined update.chain as below, but only the first one works, the others don't 
work. please help. thanks

  
add-unknown-fields-to-the-schema
composite-id
deduplicateTaxonomy
  


   
  
  


  
_gl_collection
_gl_id
  
  
id
_gl_id
  
  
_gl_id
-
  
  
  


  
_gl_dp_.*
_gl_ss_score_.*
  
  
  

thanks



Re: Filtered replication

2020-04-11 Thread Sachin Divekar
Dear all,

Just wanted to check if somebody has any thoughts on this.

A potential implementation that I am going to try is using DIH and
SolrEntityProcessor. The only problem is that it does not support
delta-import. So, I have to implement a custom solution for incremental
imports. I have started thinking about it. If anybody has any suggestions
please let me know.

thanks
Sachin

On Thu, Apr 9, 2020 at 8:13 PM Sachin Divekar  wrote:

> Hi,
>
> We run a SaaS and have a Solr Cloud setup in our cloud. We are developing
> a client-side application. We want to have a local copy of the client's
> documents stored in Solr. Here, the client's documents are identified from
> a particular field in the document e.g. client_id.
>
> I was searching for some solution by which I can replicate only those
> documents to the client-side Solr. For instance, it can be implemented in
> CouchDB by using filtered replication. Ideally, I would like to have
> one-way sync i.e. from the server to the client only. We may update the
> documents in the client-side Solr.
>
> How can I implement something like this in Solr?
>
> thanks
> Sachin
>


Re: solrQuery exception : org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: https://solrIP:8983/solr

2020-04-11 Thread Jörn Franke
Is it a self signed certificate ? Enterprise CAs? Then you need to add the 
certificates to tomcat, because Java needs to validate them (to avoid 
man-in-the-middle attacks).

Curl may not validate the certificate?!

> Am 11.04.2020 um 13:42 schrieb six23 <23sixconsult...@gmail.com>:
> 
> Hi,
> I have enabled Solr to use SSL communication in my environment. I could get
> https://localhost:8983/solr and curl it from the tomcat8 server with no
> issue. But
> I'm getting this is error in the log tomcat log " solrQuery exception :
> org.apache.solr.client.solrj.SolrServerException: IOException occured when
> talking to server at: https://solrIP:8983/solr;
> Am i missing a configuration or step somewhere to let tomcat to communicate
> with solr ?
> Can tomcat access SSL Solr directly ? or do i have to set up more
> configuration on tomcat ?
> 
> 
> 
> Any advice would be appreciated.
> Thanks
> 
> 
> 
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html


solrQuery exception : org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: https://solrIP:8983/solr

2020-04-11 Thread six23
Hi,
I have enabled Solr to use SSL communication in my environment. I could get
https://localhost:8983/solr and curl it from the tomcat8 server with no
issue. But
I'm getting this is error in the log tomcat log " solrQuery exception :
org.apache.solr.client.solrj.SolrServerException: IOException occured when
talking to server at: https://solrIP:8983/solr;
Am i missing a configuration or step somewhere to let tomcat to communicate
with solr ?
Can tomcat access SSL Solr directly ? or do i have to set up more
configuration on tomcat ?



Any advice would be appreciated.
Thanks



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html