Re: Increase in Response time when solr fields are merged

2020-11-19 Thread Ajay Sharma
Thank you Shawn for the valuable inputs.

I am assuming, please correct me if I am wrong =>
If we have two fields one has a large amount of text wrt to a field with
shorter text like description and title.
So, the Number of the tokens created for the description field will be much
high w.r.t. the title.
So if I search in the title field, it will be comparatively fast w.r.t. to
the description field

If the above listed is true then in the case of merged fields, no of tokens
have increased exponentially in a single merged field and could be a
possible reason?


On Thu, Nov 19, 2020 at 5:06 PM Shawn Heisey  wrote:

> On 11/19/2020 2:12 AM, Ajay Sharma wrote:
> > Earlier we were searching in 6 fields i.e qf is applied on 6 fields like
> > below
>
> 
>
> > We merged all these 6 fields into one field X and now while searching we
> > using this single filed X
>
> 
>
> > We are able to see a decrease in index size but the response time has
> > increased.
>
> I can't say for sure, but I would imagine that when querying multiple
> fields using edismax, Solr can manage to do some of that work in
> parallel.  But with only one field, any parallel processing is lost.  If
> I have the right idea, that could explain what you are seeing.
>
> Somebody with far more intimate knowledge of edismax will need to
> confirm or refute my thoughts.
>
> Thanks,
> Shawn
>


-- 
Thanks & Regards,
Ajay Sharma
Product Search
+91-8954492245

-- 



Re: How to use the "eval" streaming expression?

2020-11-19 Thread Joel Bernstein
This blog gets more specific with some of the ideas behind the eval
expression:

https://joelsolr.blogspot.com/2017/04/having-talk-with-solr-using-new-echo.html



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


On Thu, Nov 19, 2020 at 12:21 PM Joel Bernstein  wrote:

> You could have a program that writes a Streaming Expression
> programmatically then use eval to run it. You can also save Streaming
> Expression data structures: tuple, list, array etc... and eval them into
> live streams that can be iterated.
>
>
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Wed, Nov 18, 2020 at 7:49 PM ufuk yılmaz 
> wrote:
>
>> Hey,
>>
>> Can anyone give me an example on how can eval
>> https://lucene.apache.org/solr/guide/8_4/stream-decorator-reference.html#eval
>> be used?
>>
>> Docs says it allows to run streaming expressions those created on the
>> fly, but I can’t wrap my head on how an expression can be created on the
>> fly, maybe unless it was stored in a field in Solr?
>>
>> Best
>>
>> Sent from Mail for Windows 10
>>
>>


Re: How to use the "eval" streaming expression?

2020-11-19 Thread Joel Bernstein
You could have a program that writes a Streaming Expression
programmatically then use eval to run it. You can also save Streaming
Expression data structures: tuple, list, array etc... and eval them into
live streams that can be iterated.




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


On Wed, Nov 18, 2020 at 7:49 PM ufuk yılmaz 
wrote:

> Hey,
>
> Can anyone give me an example on how can eval
> https://lucene.apache.org/solr/guide/8_4/stream-decorator-reference.html#eval
> be used?
>
> Docs says it allows to run streaming expressions those created on the fly,
> but I can’t wrap my head on how an expression can be created on the fly,
> maybe unless it was stored in a field in Solr?
>
> Best
>
> Sent from Mail for Windows 10
>
>


Re: SolrJ NestableJsonFacet ordering of query facet

2020-11-19 Thread Jason Gerlowski
Hi Shivram,

I think the short answer is "no".  At least, not without sub-classing
some of the JSON-Facet classes in SolrJ.

But it's hard for me to understand your particular concern without
seeing a concrete example.  If you provide an example (maybe in the
form of a JUnit test snippet showing the actual and expected values),
I may be able to provide more help.

Best,

Jason

On Fri, Oct 30, 2020 at 1:54 AM Shivam Jha  wrote:
>
> Hi folks,
>
> Does anyone have any advice on this issue?
>
> Thanks,
> Shivam
>
> On Tue, Oct 27, 2020 at 1:20 PM Shivam Jha  wrote:
>
> > Hi folks,
> >
> > Doing some faceted queries using 'facet.json' param and SolrJ, the results
> > of which I am processing using SolrJ NestableJsonFacet class.
> > basically as   *queryResponse.getJsonFacetingResponse() -> returns 
> > *NestableJsonFacet
> > object.
> >
> > But I have noticed it does not maintain the facet-query order in which it
> > was given in *facet.json.*
> > *Direct queries to solr do maintain that order, but not after it comes to
> > Java layer in SolrJ.*
> >
> > Is there a way to make it maintain that order ?
> > Hopefully the question makes sense, if not please let me know I can
> > clarify further.
> >
> > Thanks,
> > Shivam
> >
>
>
> --
> shivamJha


Re: Using fromIndex for single collection

2020-11-19 Thread Jason Gerlowski
Hi Irina,

Yes, the "fromIndex" parameter can be used to perform a join from the
host collection to a separate, single-shard collection in SolrCloud.
If specified, this "fromIndex" collection must be present on whichever
host is processing the request.  (Often this involves over-replicating
your "fromIndex" so that it's co-located with the other involved
collection).

Additionally, Solr has recently gained support for "Cross Collection
Joins".  This separate approach to joining avoids the restrictions
mentioned above.  This is documented here:
https://lucene.apache.org/solr/guide/8_6/other-parsers.html#cross-collection-join

Best,

Jason

On Wed, Oct 7, 2020 at 12:45 PM Irina Kamalova  wrote:
>
> I suppose my question is very simple.
> Am I right that if I want to use joins in the single collection in
> SolrCloud across several shards,
> I need to use semantic "fromIndex"?
> According to documentation I should use it only if I have different
> collections.
> I have one single collection across multiple shards and I didn't find a way
> to join documents correctly, but with "fromIndex" semantic.
>
> Am I correct?
>
> Best regards,
> Irina Kamalova


RE: disallowing delete through security.json

2020-11-19 Thread Oakley, Craig (NIH/NLM/NCBI) [C]
Having not heard back, I thought I would ask again whether anyone else has been 
able to use security.json to disallow deletes, and/or if anyone has examples of 
using the "method" section in 
lucene.apache.org/solr/guide/8_4/rule-based-authorization-plugin.html

-Original Message-
From: Oakley, Craig (NIH/NLM/NCBI) [C]  
Sent: Monday, October 26, 2020 6:23 PM
To: solr-user@lucene.apache.org
Subject: disallowing delete through security.json

I am interested in disallowing delete through security.json

After seeing the "method" section in 
lucene.apache.org/solr/guide/8_4/rule-based-authorization-plugin.html my first 
attempt was as follows:

{"set-permission":{
"name":"NO_delete",
"path":["/update/*","/update"],
"collection":col_name,
"role":"NoSuchRole",
"method":"DELETE",
"before":4}}

I found, however, that this did not disallow deleted: I could still run
curl -u ... "http://.../solr/col_name/update?commit=true; --data 
"id:11"

After further experimentation, I seemed to have success with
{"set-permission":
{"name":"NO_delete6",
"path":"/update/*",
"collection":"col_name",
"role":"NoSuchRole",
"method":["REGEX:(?i)DELETE"],
"before":4}}

My initial impression was that this did what I wanted; but now I find that this 
disallows *any* updates to this collection (which had previously been allowed). 
Other attempts to tweak this strategy, such as granting permissions for 
"/update/*" for methods other than DELETE to a role which is granted to the 
desired user, have not yet been successful.

Does anyone have an example of security.json disallowing a delete while still 
allowing an update?

Thanks


Error when restoring Solr

2020-11-19 Thread Gell-Holleron, Daniel
Hello,

I'm trying to restore Solr and I'm getting a timeout error, e.g. Timeout 
occurred when waiting response from server at http://solrserver:8983/solr

It then says 'could not restore core'. There are just under 40 million records 
to restore so I understand this will take some time.

What timeout setting is it that I'd need to increase? My guess is the 
connTimeout and maybe the socketTimeout in the solr.xml?

Thanks,

Daniel



Re: Increase in Response time when solr fields are merged

2020-11-19 Thread Shawn Heisey

On 11/19/2020 2:12 AM, Ajay Sharma wrote:

Earlier we were searching in 6 fields i.e qf is applied on 6 fields like
below





We merged all these 6 fields into one field X and now while searching we
using this single filed X





We are able to see a decrease in index size but the response time has
increased.


I can't say for sure, but I would imagine that when querying multiple 
fields using edismax, Solr can manage to do some of that work in 
parallel.  But with only one field, any parallel processing is lost.  If 
I have the right idea, that could explain what you are seeing.


Somebody with far more intimate knowledge of edismax will need to 
confirm or refute my thoughts.


Thanks,
Shawn


Increase in Response time when solr fields are merged

2020-11-19 Thread Ajay Sharma
Hi All,

Earlier we were searching in 6 fields i.e qf is applied on 6 fields like
below

  A
  B
  C
  D
  E
  F


We had assumed if we reduced the number of fields being used to search then
the index size and response time both will decrease.

We merged all these 6 fields into one field X and now while searching we
using this single filed X
By merge i mean i index all the 6 field data into single field X

  X


We are able to see a decrease in index size but the response time has
increased.
*Are we missing something? Is our assumption correct?*

Any help will be highly appreciated.


-- 
Thanks & Regards,
Ajay Sharma
Software Engineer, Product-Search,
IndiaMART InterMESH Ltd

--