I have an index :
from rest in docs
from prom in rest.RestPromotions
When querying with LuceneQuery the TotalResults is more than expected because of the duplicate documents created by the index. The skipped field has only the skipped results from the current page.
Is there a way to get the distinct total results?
The document type is like this:
{
"RestName": "Belini",
"RestID": 1275,
"SearchNotVisible": [
"Beliny",
"bellini"
],
"RegionID": 4,
"SubRegionID": 0,
"CityID": 172,
"AreaID": 5,
"AvgPriceID": 3,
"RestTypes": [
58
],
"FoodTypes": [
1,
16
],
"RestSpecials": [],
"RestProperties": [
4
],
"RestPromotions": [
{
"regionID": 4,
"cityID": 172,
"areaID": 0,
"KosherID": 0,
"foodTypeID": 16,
"restTypeID": 0,
"promotionNumber": 1,
"isFalsePromo": false
},
{
"regionID": 4,
"cityID": 172,
"areaID": 0,
"KosherID": 0,
"foodTypeID": 0,
"restTypeID": 0,
"promotionNumber": 1,
"isFalsePromo": false
},
{
"regionID": 4,
"cityID": 172,
"areaID": 0,
"KosherID": 0,
"foodTypeID": 1,
"restTypeID": 0,
"promotionNumber": 1,
"isFalsePromo": false
},
"isKosher": false,
"ReviewsScore": 3.709,
"ReviewsAmount": 408,
"Latitude": 32.060707,
"Longitude": 34.765018
}
and when doing a LuceneQuery on the index :
from rest in docs
from prom in rest.RestPromotions
select new {RestID=rest.RestID,RestName=rest.RestName,PromoCityID=prom.cityID}
the TotalResult is greater than the real amount of documents returned by the query. I know this is because of duplicated documents that are made by the index.
What I want to know is if there is an option to get the real amount of distinct documents that a specific LuceneQuery has generated.