Thanks Jack, inorder to not affect the query time , what are the options available to handle this as index time ? So that I group all the similar books at index time by placing them in some kind of a set , and retrive all the contents of the set at query time if any one them matches the query. On Dec 29, 2014 12:49 AM, "Jack Krupansky" <jack.krupan...@gmail.com> wrote:
> You can also use group.query or group.func to group documents matching a > query or unique values of a function query. For the latter you could > implement an NLP algorithm. > > > -- Jack Krupansky > > On Sun, Dec 28, 2014 at 5:56 PM, Meraj A. Khan <mera...@gmail.com> wrote: > > > Thanks Aman, the thing is the bookName field values are not exactly > > identical , but nearly identical , so at the time of indexing I need to > > figure out which other book name field this is similar to using NLP > > techniques and then put it in the appropriate bag, so that at the > retrieval > > time I only retrieve all the elements from that bag if any one of the > > element matches with the search query. > > > > Thanks. > > On Dec 28, 2014 1:54 PM, "Aman Tandon" <amantandon...@gmail.com> wrote: > > > > > HI, > > > > > > You can use the grouping in the solr. You can does this by via query or > > via > > > solrconfig.xml. > > > > > > *A) via query* > > > > > > > > > http://localhost:8983?your_query_params*&group=true&group.field=bookName* > > > > > > You can limit the size of group (how many documents you wants to show), > > > suppose you want to show 5 documents per group on this bookName field > > then > > > you can specify the parameter *group.limit=5.* > > > > > > *B) via solrconfig* > > > <str name="group">true</str> <str name="group.field">*bookName*</str> > > > <str name="group.ngroups">true</str> <str > > name="group.truncate">true</str> > > > > > > With Regards > > > Aman Tandon > > > > > > On Sun, Dec 28, 2014 at 10:29 PM, S.L <simpleliving...@gmail.com> > wrote: > > > > > > > Hi All, > > > > > > > > I have a use case where I need to group documents that have a same > > field > > > > called bookName , meaning if there are a multiple documents with the > > same > > > > bookName value and if the user input is searched by a query on > > bookName > > > , > > > > I need to be able to group all the documents by the same bookName > > > together, > > > > so that I could display them as a group in the UI. > > > > > > > > What kind of support does Solr provide for such a scenario , and how > > > should > > > > I look at changing my schema.xml which as bookName as single valued > > text > > > > field ? > > > > > > > > Thanks. > > > > > > > > > >