Hi Tommaso

I don't think you can achieve what you want using vanilla solr.
Facet counts will be for the result set matching not for the top n
result sets matching.

However what is your use case ? Assuming its for faceted navigation
showing facets for the
top n result sets could be confusing to your users. As the next
incremental filter applied by the user would change the "relevancy
focus" of the user and produce another set of top n facet counts with
a document set un-related to the last result set. This could be a very
bad user experience producing a fluctuating facet counts (ie a filter
narrowing the search could produce an increase in a facet term count -
very odd) also the result set could change strangely with docs
floating in and out of the result list.

relevancy seems to be the answer here - if your docs are scored
correctly then counting all docs in the result set for the facet
counts is correct. do you need to improve relevancy?




On 18 June 2011 08:23, Dmitry Kan <dmitry....@gmail.com> wrote:
> Do you mean you would like to boost the facets that contain the most of the
> lemmas?
> What is the user query in this case and if possible, what is the use case
> (may be some other solution exists for what you are trying to achieve)?
>
> On Thu, Jun 16, 2011 at 5:23 PM, Tommaso Teofili
> <tommaso.teof...@gmail.com>wrote:
>
>> Thanks Dmitry, but maybe I didn't explain correctly as I am not sure
>> facet.offset is the right solution, I'd like not to page but to filter
>> facets.
>> I'll try to explain better with an example.
>> Imagine I make a query and first 2 docs in results have both 'xyz' and
>> 'abc'
>> as values for field 'lemmas' while also other docs in the results have
>> 'xyz'
>> or 'abc' as values of field 'lemmas' then I would like to show facets
>> "coming from" only the first 2 docs in the results thus having :
>> <lst name="lemmas">
>>  <str name="xyz">2</str>
>>  <str name="abc">2</str>
>> </lst>
>> You can imagine this like a 'give me only facets related to the most
>> relevant docs in the results' functionality.
>> Any idea on how to do that?
>> Tommaso
>>
>>
>> 2011/6/16 Dmitry Kan <dmitry....@gmail.com>
>>
>> > http://wiki.apache.org/solr/SimpleFacetParameters
>> > facet.offset
>> >
>> > This param indicates an offset into the list of constraints to allow
>> > paging.
>> >
>> > The default value is 0.
>> >
>> > This parameter can be specified on a per field basis.
>> >
>> >
>> > Dmitry
>> >
>> >
>> > On Thu, Jun 16, 2011 at 1:39 PM, Tommaso Teofili
>> > <tommaso.teof...@gmail.com>wrote:
>> >
>> > > Hi all,
>> > > Do you know if it is possible to show the facets for a particular field
>> > > related only to the first N docs of the total number of results?
>> > > It seems facet.limit doesn't help with it as it defines a window in the
>> > > facet constraints returned.
>> > > Thanks in advance,
>> > > Tommaso
>> > >
>> >
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Dmitry Kan
>> >
>>
>
>
>
> --
> Regards,
>
> Dmitry Kan
>

Reply via email to