lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thiaga rajan <>
Subject Fw: Select distinct multiple fields
Date Thu, 19 May 2016 20:23:20 GMT

Thanks Joel for the response. In our requirement there is some logic that needs to be implemented
after fetching the results from solr which might have an impact in working out the pagination

ie, we have data structures like(nested structure is flattened) we need to have this kind
of structure as below we might need to support some other use cases. Hierarchical structure
will not support other use cases. So we have flatten our data structure and we need to achieve
the search in the flat structure below

| Level1 | Level2 | Level3 |
| 1 | 11 | 111 |
| 1 | 11 | 112 |
| 1 | 11 | 113 |
| 1 | 11 | 114 |

 Example - When the customer enters 11 we might need to query this word from the entire data
so we will get all the records including Level3 as well. But ideally we need to select only
1,11(filtering the current level and parent level). Also another problem is pagination. We
might select 10 recs from example after filtering the levels/parent matching with the search
keyword, the number of records might get reduced. So we might need to send another request
to solr to get the next set and again working out the level and its parent which matches with
the search keyword till we reach the required row count. 

Rather than doing this, is there a way(kind of any plugin like SearchComponent) will help
with the above scenaio or best way to achieve this in solr?Kindly provide your valuable suggestions
on this 

       On Thursday, 19 May 2016 6:11 PM, Joel Bernstein <> wrote:

Joel Bernstein

On Thu, May 19, 2016 at 1:10 PM, Joel Bernstein <> wrote:

The SQL interface and Streaming Expressions support selecting multiple distinct fields.
The SQL interface can use the JSON facet API or MapReduce to provide the results.
You the facet function and unique function are the Streaming Expressions that the SQL interface
Joel Bernstein

On Thu, May 19, 2016 at 12:41 PM, thiaga rajan <> wrote:

Hi Team - I have seen select distinct multiple fields is not possible in Solr and i have seen
suggestions coming up on faceting and grouping. I have some questions. Is there any with any
kind of plugins/custom implementation we can achieve the same
1. Using any plugin or through custom implementation whether we will be able to achieve the
select distinct fields apart from facet and group by...Because the pagination is kind of issue.
For example - We are setting a pagination of 10. If we are getting 10 records (along with
the duplicates) then we might ending up a getting the results less than 10. 
Any suggestions on this?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message