facet.limit on Solrj v6.1.0 - solr

I am trying increase the amount of term facets returned from a query.
I have first added -1 to the request handler in solrconfig.xml. It works fine if I query solr servers directly, but once I try to use the same query on Solrj client, it is still returns only 10 facets in the response. I have tried to add facet.limit param to the query explicitly for solrj, but still I am only seeing 10 facets in the response. Are there any kind of other params or configs needed for solrj to use unlimited amount of facets or increase the number of facets to something bigger than the default value?
p.s I have initially tried to post the question on the mail list of Solr, but for some reason it failed constantly to post there
edit: I have tried to use direct solr querying with the json.facets, and setting facet.limit value does not work work json.facets.

Okay, it was basically the json.facet part. Although the docs on https://lucene.apache.org/solr/guide/7_2/json-facet-api.html are for 7.2, the same rule applies for 6.1.0.
It is seriously confusing though, as setting the facet.limit value via solrconfig.xml or Solrj client fails silently and there docs do not mention about the issue for json.facets

Related

Solr - Combining automated crawl values and other manually entered data

new to Solr and have implemented a crawl for specific URLs with Nutch/Solr. If I add new fields to the Solr schema, can I still use it to crawl with Nutch and import into Solr without problems, or will the manually entered fields cause the crawl to not work properly? Thank you for your time.
Adding some fields to the Solr schema should not cause any trouble at all, keep in mind that this will be true unless you specify one of the new fields as required in which case an exception will be thrown. Otherwise you're fine. Of course since Nutch is unaware of these fields no value will be set during the Nutch crawl.

Timeout Solr search

I'm trying to timeout Solr if it takes too long to run a query.
What I've tried:
According to Solr documentation there is timeAllowed parameter which does exactly what I'm looking for, I've tried to
add <int name="timeAllowed">50</int> to requestHadnler in solrConfig.xml;
add timeAllowed parameter to request URL:
localhost:8080/solr4/alfresco/select?q=*&timeAllowed=50
But it doesn't work (time to load results is more than provided value).
Why I want to do this: we implemented access right validation on Solr side and now for some vague queries like * it takes too much time for Solr to respond.
Probably it could be possible to close such connections from Alfresco or from web container but then such queries will internally run on Solr slowing down the server.
You need to insert timeAllowed in milliseconds. timeAllowed 50 - This means that you need to complete the request in 50 milliseconds.
Try timeAllowed 5000.

Same query in Solr - producing different results when done through SolrNet

I am doing two very identical queries into Solr for the same search term, it gives me different results. Actually one is done using Solr Admin interface and another is using SolrNet - Client library.
Can anyone give me any explanation why this is happening, or what's wrong and how to fix. I'm out of idea!
http://localhost:8983/solr/demo/select?q=black%20samsung%20android%20smart%20phone&wt=json&indent=true&defType=edismax&mm=75%25
Gives 816 results - this one is done using Solr Admin.
http://localhost:8983/solr/demo/select?q=black%20samsung%20android%20smart%20phone&start=0&rows=2&qt=edismax&mm=75%25
Gives 10224 results - this one is done using SolrNet.
I have total 80k + test products.
The correct result is produced by doing query by Solr Admin.
The problem in the second query might be qt=edismax! Do you have defined any request handler like that?
I would suggest you to define defType in extra param while querying Solr using SolrNet.

Solr More Like This results narrowed down by facet field

I have a single Solr instance for indexing multiple sites content.
While indexing I am populating Website field to be able to perform faceted search on that field for every particular website...and that works ok.
Though, if I use Solr MLT feature I get results from all websites, and I want to narrow MLT results down just to the single website.
Is it possible to define facet for the Solr MLT or is there any other better way to achieve the same?
If Solr supports that, is it also available in solrnet?
Solr 3.1 doesn't support filters on the MoreLikeThis component (issue here). You have to use the MoreLikeThis handler, but this handler is not currently implemented in SolrNet (issue here). available as of 0.4.0 beta 1

Solr match all aka *:* does not work

Don't know what I did wrong. I have two indices with identical documents in it. The local index was replicated from a master which responds correctly, so the same solrconfig.xml and schema.xml file. But if I query the index on my local machine with *:* I get 0 docs. (other queries on my local machine are working correct)
I tried jetty and tomcat for the local index. no success.
The *:* behaviour is crucial for me, because some test cases are failing now. Do you have an idea what could be wrong?
You probably have dismax set up as the default query handler instead of the standard one. Check your solrconfig.xml.
Simply remove q=*:* from the query to get all results with dismax

Resources