solr record grouping not working - solr

I want to apply group by on my solr document. I have tried
group:on&group.field=<field_name>
in my query. On using this I do not receive any record at all.
In the solr doc, it is mentioned that the field on which I need to apply grouping must be indexed. That group field is already indexed in my case.
The hints and web have not helped me so far.
Solr Version: v6.2.0

Related

Solr alternates returning different versions of the same document

I have the following problem with Solr 4.5.1, with a cloud install with 4 shards:
I have updated a document via the Solr console (select a core, then select "Documents"). I used the CSV format to upload the document, including the document ID.
When I query the document id from the Solr console (simple query: id:"the-id-of-the-doc-I-updated"), I alternatively obtain the old document (with the values before update, and a given version number), or the new document (with the values after update, and a different version).
No log messages in the Solr console.
Any idea what might be going on, and how to fix that problem?
Thanks in advance,
Yann
This seems to be due in a bug in Solr; the Solr console doesn't handle document routing properly. Deleting documents (via a delete query), and then adding documents from the console fixed that problem.

I'm having problems adding a new search criteria to Solr

Facts
Solr is installed and has indexed the user core.
I've added the field "ssotoken" to the schema.xml.
I've re-indexed the Solr core after adding the "ssotoken" field to the user core.
I can see the query contain "ssotoken" but the search criteria is not returning anything.
Please note that other field criterias return a result-set in xml format.
Please let me know what other details you need.
I have struggled with this for a couple of days now. Any help is greatly appreciated.

Updating Solr Field Value

is there any possibility to update a value of a Solr-Field without reindexing the whole document?
Nope.
You need to index the document again with all the fields.
Solr will delete and insert the document again.
There is nice talk about it you may want to hear.
This functionality is available in the Solr version 4.0. That version is still in Beta, but will most likely be released before the end of the year. Please see the post - Solr 4.0: Partial documents update for more details on how this works.
When you want to change a single field of a document you will have to reindex the whole document, as solr does not support updating of a field only.

Solr field collapsing

I read
http://wiki.apache.org/solr/FieldCollapsing
and I tried the query
http://192.168.0.1:8080/solr/append/select?q=mobile&group=true&group.field=brand
and I don't see the field collapsing. I mean I see the results, but not the grouping. My understanding is it should work, nothing to change in the solrconfig.xml ? In my schema, all my field are stored/index. My index is Lucene 2.9 and my Solr is 1.4.1. I don't see what I doing wrong...
Field collapsing is not available in Solr 1.4.1. You need Solr 3.3 or 4.0 (currently unreleased).
The wiki page about field collapsing also explains "If you haven't already, get a recent nightly build of Solr4.0 or Solr3.3..."
Look for "warning tags" in the Solr wiki that show when a particular feature is available only since a particular version of Solr:

Identifying strings in documents, with nutch+solr?

I'm looking into a search solution that will identify strings (company names) and use these strings for search and facets in Solr.
I'm new to Nutch and Solr so I wonder if this is best done in Nutch or in Solr. One solution would be to generate a Parser in Nutch that identifies the strings in question and then index the name of the company, later mapped to a Solr value. I'm not sure on how, but I guess this could also be done inside Solr directly from the text?
Does it make sense to do this string identification in Nutch or in Solr and is there some functionality in Solr or Nutch that could help me here?
Thanks.
You could embed a NER library (see opennlp, lingpipe, gate) in to a custom parser, generate new fields and create an indexingfilter accordingly. This is not particularly difficult and the advantage compared to doing this on the SOLR side is that you'd gain from the scalability of mapreduce (NLP tasks are often CPU-hungry).
See Behemoth for an example of how to embed GATE in mapreduce
Nutch works with Solr by indexing the crawled data to Solr via the Solr HTTP API. You trigger the indexation by calling the solrindex command. See this page for details on how to setup this.
To be able to extract the company names, I would add the necessary code in Solr. I would use a UpdateRequestProcessor. It allows to add an extra step in the indexing process to add extra fields in the document being indexed. Your UpdateRequestProcessor would be used to examine to document sent to Solr by Nutch, extract the company names from the text and add them as new fields in the document. Solr would them index the document + the fields that you add.

Resources