0

I have a set of data following a similar data structure below:

{
    "first_name": "some_value",
    "last_name": "some_value_2",
    "instance": "some_instance"
    "num_of_tries": 159,
    "uuid": "some_uuid",
    "background": "something the user can input anything that want here"
    ... more data ...
}

I have a schema-less index using the standard analyzer (no custom mappings).

I pull data from A server that has 52 records. It gets indexed into the index successfully. I then do a match search against the index using the instance field (say, "ins55"). All 52 records come back as expected that match this instance value. I can also see 52 docs, as expected.

I then add another 198 records from B server. It gets indexed into the index successfully. I can see that there are now 250 docs, as expected in the index. I then do match search against the index using the instance field that matches the data from the A server (the "ins55"). Only 22 records come back out of the 52 records that were expected.

Can someone give me some insight into why all 250 docs are listed in the index, but it's not returning the expected number of records for the match?

Sean
  • 2,496
  • 7
  • 32
  • 60
  • What kind of document ID are you using? custom ones or auto-generated ones? – Val Jan 04 '18 at 05:09
  • I am using the auto generated one. There are no settings setup for this index. It’s basically a default generated index. – Sean Jan 04 '18 at 21:49
  • So auto generated ones to answer the question. – Sean Jan 04 '18 at 21:49
  • ok, how do you populate your index (custom client code, Logstash, etc)? Can you show some code? – Val Jan 05 '18 at 05:02
  • Yeah. Right now I’m using Ruby gem to handle adding new items to index on a schedule through a rake task. The “elasticsearch-persistence” gem. – Sean Jan 05 '18 at 06:31
  • Sorry, I have been on holiday. So, looking at the backend code, it's just doing a normal PUT to put stuff into elastic. Nothing special is going on with the PUT. – Sean Jan 10 '18 at 15:42

0 Answers0