Is there any way i can find the percentage of facet name matched for a
query rather than the number of documents having that facet.
That is , instead of telling that there are 1000 documents which have a
facet yahoo , i want the result which tells me that there are 60% document
which matches the query and have a facet yahoo. Rest 40% of documents which
have the facet yahoo dont match the query.
Is there any way i can find the percentage of facet name matched for a
query rather than the number of documents having that facet.
That is , instead of telling that there are 1000 documents which have a
facet yahoo , i want the result which tells me that there are 60% document
which matches the query and have a facet yahoo. Rest 40% of documents which
have the facet yahoo dont match the query.
Is there any way i can find the percentage of facet name matched for a
query rather than the number of documents having that facet.
That is , instead of telling that there are 1000 documents which have a
facet yahoo , i want the result which tells me that there are 60% document
which matches the query and have a facet yahoo. Rest 40% of documents which
have the facet yahoo dont match the query.
Don't quite understand your math. India 50%? Depending on what you are
after, it should either be 5/20 or 5/8. I can understand your problem
better if you can explain how those percentages are calculated.
In your first example, you have the percentage for Yahoo vs.
everything else. In your second example, you should percentages for
multiple values: India, US, and UK. Which one do you want? First one
is tricky, I would probably use two facets, one with a filter, and the
other one without, and then calculate percentages on the client side.
Is there any way i can find the percentage of facet name matched for a
query rather than the number of documents having that facet.
That is , instead of telling that there are 1000 documents which have a
facet yahoo , i want the result which tells me that there are 60% document
which matches the query and have a facet yahoo. Rest 40% of documents which
have the facet yahoo dont match the query.
That is also a useful variable but what i mean was not that.
Lets say there are total of 30 feeds in an index and for the field
Country , there are 10 India , 5 US and 3 UK.
No for the query "growth" , i got 20 hits , out of which for the field
country there are 5 India , 2 US and 1 UK.
What i want is for the facet Country:India , i want the result as
India - 50% , US = 40% , UK = 33.3%
Thanks
Vineeth
I also don't see your math, but I think it is
india = 5 new ones (I suppose this means there 15 total both old and
new) which is a growth of 50% over the 10 original.
I'd just to two facets,
1st facet base counts
2nd facet counts growth for period
and do the division yourself.
But I think you could do both in the same search request.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.