lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cario, Elaine" <Elaine.Ca...@wolterskluwer.com>
Subject RE: Result grouping using externalfilefield
Date Tue, 14 Oct 2014 19:46:04 GMT
Sudhaker,

Not sure if this has anything to do with your problem, but I had an issue with grouping on
non-string fields (in my case it was an integer) in  SolrCloud setup (4.7).  But I was using
internal fields.  We worked around it by defining the field as a string instead.

-----Original Message-----
From: Sudhakar Maddineni [mailto:maddinenidev@gmail.com] 
Sent: Friday, September 19, 2014 2:10 PM
To: solr-user@lucene.apache.org
Subject: Result grouping using externalfilefield

Hi,
 Just trying to understand grouping feature with solrcloud 4.2 and I have 4
node/2 shard cluster setup.I am trying to group my search results based on an externalfilefield
that I defined.

Here is my configuration:

core1:
==========

schema.xml:

<field name="core" type="external" stored="false" indexed="false"/> <fieldType name="external"
keyField="document_id" defVal="*1*"
class="solr.ExternalFileField" valType="pfloat"/>

solrconfig.xml:

<listener event="newSearcher"
          class="org.apache.solr.schema.ExternalFileFieldReloader"/>
<listener event="firstSearcher"
          class="org.apache.solr.schema.ExternalFileFieldReloader"/>

And, created empty file with name external_core.txt in index dir.

core2:
=======
same configuration as above except the default value=2 <fieldType name="external" keyField="document_id"
defVal="*2*"
class="solr.ExternalFileField" valType="pfloat"/>



http://localhost:8983/solr/core1/select?q=te*&wt=json&fl=*,field(core)&indent=true&collection=core1,core2&df=default&group=true&group.field=core&group.limit=10


query results:

{
  "responseHeader":{
    "status":0,
    "QTime":19,
    "params":{
      "df":"default",
      "fl":"*,field(core)",
      "indent":"true",
      "q":"te*",
      "group.limit":"10",
      "group.field":"core",
      "collection":"core1,core2",
      "group":"true",
      "wt":"json"}},
  "grouped":[
    "core",{
      "matches":3,
      "groups":[{
          *"groupValue":null,*
          "doclist":{"numFound":3,"start":0,"maxScore":0.20959431,"docs":[
              {
                "document_id":"xxxx_1",
                ....

                *"field(core)":1.0},*
              {
                "document_id":"yyyy_1",

                 ...

                *"field(core)":0.0},*
              {
                "document_id":"zzzz_1",

                ......
                *"field(core)":0.0}*]
          }}]}]}


Issue:
Not getting query results grouped by "core" field which is an externalfilefield.
Can't we use EFF as a grouping field?If not, Is there an alternative using EFF when grouping
results.



Appreciate your help.


Thanks,Sudhakar.
Mime
View raw message