like Query is not run correct?

my query=‘exported not like “202112”’

my_record: record[‘exported’].value = ’ 202112’ (field text)

expect result after use API get: []

but i receiver: [my_record]

P/S: last week, the query run as my expect. but yesterday, it did not run such as before

Hi Tân Lương Nhật,

 

In kintone, the full-text search engine is used for refinement searches, including the like API.

 

The full-text search engine is updated when a record is registered or updated, but the search result may not be correct if you execute a fetch before the update is complete.

 

As a workaround, you can wait for the update to finish, so you can retrieve the record typically by waiting for the process to finish.

 

Hopefully, this helps.

Thank for your response,

Now, i knew kintone used full-text search engine. But i did not found answer for my question. 

Example, my records have two record:

    record #1: contain field exported.value = ‘202112 202011’

    record #2: contain field exported.value = ‘202011’

Which query must i use to get records, which have value of exported field not contain string ‘202112’?

P/s: I used query: 'exported not like “202112” '. I received result: [record #1, record #2], my expect result: [record #2]

 

Hello Tan,

From what you wrote on this thread, you seem to understand how to write the query, so as Sean said, it could be the timing of your query. The query should be processed after the completion of record updates.
Or it could be a small thing. I’m not sure how your actual script looks like but based on what you wrote here:

my_record: record['exported'].value = ' 202112' (field text)

there’s an extra space in the field text value before the number and after '.
These small things might be affecting your result, so could you check into it?