Re: Results grouping performance with groups.ngroups=true

2018-08-11 Thread SayantiGmail
Hi Mikhail

Even after using json facets latency seems to be high if group.ngroups=true.

Regards,
Sayan

> On 12 Aug 2018, at 02:07, Mikhail Khludnev  wrote:
> 
> As far as I remember, groups facets can be calculated with json.facets a
> way faster.
> 
>> On Sat, Aug 11, 2018 at 1:43 PM SayantiGmail  wrote:
>> 
>> Hi,
>> 
>> The time taken to group results when the resultset has ~ 200k items is
>> very high.
>> 
>> Is there a way to optimize the performance.
>> The group count and facet count is required.
>> 
>> Regards,
>> Sayan
>> 
>> 
>> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev


Re: Highlighting is not working with docValues only String field

2018-08-11 Thread Erick Erickson
I can see why it wouldn't and also why it could/should. I also wonder about
SortableTextField, perhaps mention that too.

Seems worth a JIRA to me if there isn't one already

On Fri, Aug 10, 2018, 19:49 Karthik Ramachandran <
kramachand...@commvault.com> wrote:

> We are using Solr 7.2.1, highlighting is not working with docValues only
> String field.
>
> Should I open a JIRA for this?
>
> Schema:
> 
>   id
>   
>required="true"/>
>stored="true"/>
>stored="false"/>
>   
> 
>
> Data:
> [{"id":1,"name":"Testing line 1"},{"id":2,"name":"Testing line
> 2"},{"id":3,"name":"Testing line 3"}]
>
> Query:
>
> http://localhost:8983/solr/test/select?q=Testing*=name=true=name,name1
>
> Response:
> {"response":{"numFound":3,"start":0,"docs":[{"id":"1","name":"Testing line
> 1","name1":"Testing line 1"},{"id":"2","name":"Testing line
> 2","name1":"Testing line 2"},{"id":"3","name":"Testing line
> 3","name1":"Testing line 3"}]},"highlighting":{"1":{"name":["Testing
> line 1"]},"2":{"name":["Testing line
> 2"]},"3":{"name":["Testing line 3"]}}}
>
>
> With Thanks & Regards
> Karthik Ramachandran
> P Please don't print this e-mail unless you really need to
>
> ***Legal Disclaimer***
> "This communication may contain confidential and privileged material for
> the
> sole use of the intended recipient. Any unauthorized review, use or
> distribution
> by others is strictly prohibited. If you have received the message by
> mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **
>


Re: Faceting with nested Document

2018-08-11 Thread Mikhail Khludnev
The first two mistakes are:
 - using fq for children fields ,
 - using a value master_id:0 as a parents' filter
Regarding the question, you are getting non-zero facets because you exclude
filter produces empty results.


Re: Results grouping performance with groups.ngroups=true

2018-08-11 Thread Mikhail Khludnev
As far as I remember, groups facets can be calculated with json.facets a
way faster.

On Sat, Aug 11, 2018 at 1:43 PM SayantiGmail  wrote:

> Hi,
>
> The time taken to group results when the resultset has ~ 200k items is
> very high.
>
> Is there a way to optimize the performance.
> The group count and facet count is required.
>
> Regards,
> Sayan
>
>
>

-- 
Sincerely yours
Mikhail Khludnev


Re: Solr Multiple Hostnames

2018-08-11 Thread Kelly Rusk
Thank you Shawn!

Kelly

From: Shawn Heisey 
Sent: Saturday, August 11, 2018 12:01:21 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr Multiple Hostnames

On 8/10/2018 11:12 AM, Kelly Rusk wrote:
> I want traffic passed over https to flow through the load balancer and 
> resolve on the Solr servers by an address of 
> https://solr.mydomain.com:8983/solr. The hostname I have set for the Solr 
> Master is master.mydomain.com and the Slave is slave.mydomain.com.
>
> So, are you stating that so long as my DNS has an entry for the domain of  
> https://solr.mydomain.com:8983/solr it should work, even if the individual 
> Solr servers have their host set as master.mydomain.com or slave.mydomain.com.

Any request you send that's properly formatted will be answered.  If DNS
sends it to Solr, the port is correct, the protocol is correct, and all
that, it should work.  You could have the following host header in the
HTTP request that Solr receives and it would work:

Host: wibble.frongle.spoof

The *load balancer* might care about the host header, but unless you
tweak the jetty config to accomplish something different than Solr ships
with, Solr will not care what the host header contains.  You won't even
*need* a Host header.

When you configure a replication slave, you give it a URL for the
master.  That must be a good URL, of course.  The master doesn't get
told about the slaves.

Thanks,
Shawn



Re: 4 days and no solution - please help on Solr

2018-08-11 Thread Jason Gerlowski
You're right that "Update" is a little misleading as a name.

Solr uses that term across the board to refer to new or updated docs.
The "add-documents" API is /solr/collection_name/update and is
implemented by "UpdateRequestHandlers".  You can configure Solr to
massage documents before indexing with a "UpdateRequestDocumentChain".
etc.

So the name is misleading, but at least it's consistent.

Best,

Jason
On Fri, Aug 10, 2018 at 10:52 PM ☼ R Nair  wrote:
>
> Thanks Christoper and Jason. Problem solved. What you mentioned works.
>
> Thanks a million. Have a good weekend.
>
> Best,
> Ravion
>
> On Fri, Aug 10, 2018 at 3:31 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > Ravion,
> >
> > What's wrong with "update request"? Updating a document that does not
> > exist... will add it.
> >
> > -chris
> >
> > On 8/10/18 3:01 PM, ☼ R Nair wrote:
> > > Do you feel that this is only partially complete?
> > >
> > > Best, Ravion
> > >
> > > On Fri, Aug 10, 2018, 1:37 PM ☼ R Nair 
> > wrote:
> > >
> > >> I saw this. Please provide for add. My issue is with add. There is no
> > >> "AddRequesg". So how to do that, thanks
> > >>
> > >> Best Ravion
> > >>
> > >> On Fri, Aug 10, 2018, 12:58 PM Jason Gerlowski 
> > >> wrote:
> > >>
> > >>> The "setBasicAuthCredentials" method works on all SolrRequest
> > >>> implementations.  There's a corresponding SolrRequest object for most
> > >>> common Solr APIs.  As you mentioned, I used QueryRequest above, but
> > >>> the same approach works for any SolrRequest object.
> > >>>
> > >>> The specific one for indexing is "UpdateRequest".  Here's a short
> > example
> > >>> below:
> > >>>
> > >>> final List docsToIndex = new ArrayList<>();
> > >>> ...Prepare your docs for indexing
> > >>> final UpdateRequest update = new UpdateRequest();
> > >>> update.add(docsToIndex);
> > >>> update.setBasicAuthCredentials("solr", "solrRocks");
> > >>> update.process(client, "techproducts");
> > >>> On Fri, Aug 10, 2018 at 12:47 PM ☼ R Nair 
> > >>> wrote:
> > 
> >  Hi Jason,
> > 
> >  Thanks for replying.
> > 
> >  I am adding a document, not querying. I am using 7.3 apis. Adding a
> >  document is done via solrclient.add(). How to set authentication
> > in
> >  this case? Seems I can't use SolrRequest.
> > 
> >  Thx, bye
> >  RAVION
> > 
> >  On Fri, Aug 10, 2018, 10:46 AM Jason Gerlowski  > >
> >  wrote:
> > 
> > > I'd tried to type my previous SolrJ example snippet from memory.
> > That
> > > didn't work out so great.  I've corrected it below:
> > >
> > > final List zkUrls = new ArrayList<>();
> > > zkUrls.add("localhost:9983");
> > > final SolrClient client = new CloudSolrClient.Builder(zkUrls,
> > > Optional.empty()).build();
> > >
> > > final Map queryParamMap = new HashMap > >>> String>();
> > > queryParamMap.put("q", "*:*");
> > > final QueryRequest query = new QueryRequest(new
> > > MapSolrParams(queryParamMap));
> > > query.setBasicAuthCredentials("solr", "solrRocks");
> > >
> > > query.process(client, "techproducts"); // or, client.request(query)
> > > On Fri, Aug 10, 2018 at 10:12 AM Jason Gerlowski <
> > >>> gerlowsk...@gmail.com>
> > > wrote:
> > >>
> > >> I would also recommend removing the username/password from your Solr
> > >> base URL.  You might be able to get things working that way, but
> > >>> it's
> > >> definitely less common, and it wouldn't surprise me if some parts of
> > >> SolrJ mishandle a URL in that format.  Though that's just a hunch on
> > >> my part.
> > >> On Fri, Aug 10, 2018 at 10:09 AM Jason Gerlowski <
> > >>> gerlowsk...@gmail.com>
> > > wrote:
> > >>>
> > >>> Hi Ravion,
> > >>>
> > >>> (Note: I'm not sure what Solr version you're using.  My answer
> > >>> below
> > >>> assumes Solr 7 APIs.  These APIs don't change often, but you might
> > >>> find them under slightly different names in your version of Solr.)
> > >>>
> > >>> SolrJ provides 2 ways (that I know of) to provide basic auth
> > > credentials.
> > >>>
> > >>> The first (and IMO simplest) way is to use the
> > >>> setBasicAuthCredentials
> > >>> method on each individual SolrRequest.  You can see what this
> > >>> looks
> > >>> like in the example below:
> > >>>
> > >>> final SolrClient client = new
> > >>>
> > >>> CloudSolrCLient.Builder(solrURLs).withHttpClient(myHttpClient).build();
> > >>> client.setDefaultCollection("collection1");
> > >>> SolrQuery req = new SolrQuery("*:*");
> > >>> req.setBasicAuthCredentials("yourUsername", "yourPassword);
> > >>> client.query(req);
> > >>>
> > >>> SolrJ also has a PreemptiveBasicAuthClientBuilderFactory, which
> > >>> reads
> > >>> the username/password from Java system properties, and is used to
> > >>> configure the HttpClient that SolrJ creates internally for sending
> > 

Results grouping performance with groups.ngroups=true

2018-08-11 Thread SayantiGmail
Hi,

The time taken to group results when the resultset has ~ 200k items is very 
high.

Is there a way to optimize the performance.
The group count and facet count is required.

Regards,
Sayan