Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

results.total does not correspond to results.searchResults.size() (in some cases) #68

Open
littleiffel opened this issue Sep 16, 2013 · 2 comments

Comments

@littleiffel
Copy link

I see sometimes in the logs
"Unknown SearchHit...."

And in this case the total does not correspond (but is higher then) the size of returned hits.

I see that some hits are not added to resultsList in buildResults(). Why is this happening? Is this behaviour desired or is it a bug?

@mstein
Copy link
Owner

mstein commented Sep 24, 2013

The plugin does not include results if it doesn't have a mapping for it, it may also mean that he fails to recognize the result as a valid domain. Could you provide an example of the domain & request where this issue occurs ?

@littleiffel
Copy link
Author

I have 3 domain classes. One common Parent

class Item{
  static searchable = {
      root = false
   }
  String descritption
  String title
}
class Offer extends Item{
   static searchable = {
      only = ['title', 'description']
   }
}
class Request extends Item{
   static searchable = {
      only = ['title', 'description']
   }
}

When i use elasticSearchSerivce.search('query') it finds one Offer. (That is correct. It should find 1 Offer) But the result is as follows:

['total':2, 'searchResults':[Offer: 1234]]

Offer.search('query') does not return anything and Item.search('query') does not exisit (as expected).

I assume it is the inheritance that might cause some problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants