Project

General

Profile

Bug #2601

matching document not found when Ingesting the same book in overwrite mode

Added by Venmuhilan B about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Urgent
Target version:
Start date:
09/07/2022
Due date:
09/08/2022
% Done:

100%

Estimated time:
2.00 h

Description

When comparing the section heirarchy of old and new version of Document 60 of Library reference DT, it didn't find the match document eventhough old and new version are the same book

#1

Updated by Venmuhilan B about 2 years ago

  • Status changed from New to In Progress

Reason:
ssname present in the text file - print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)

ssname in the content kind:
- String value -> "print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False)"

ssname in the query to fetch the document from content kind:
select * from content where documentProcessingId = '68881601-b3dc-484e-ba5f-01246c2457b0' and ssname = 'Built-in Functions' and sssname = 'print(*objects, sep=\' \', end=\'\n\', file=sys.stdout, flush=False)'

we are doing escape SingleQuotation for the sname( ' to \'). If we don't escape single quotation, it will throw this error
SEVERE: com.google.cloud.datastore.DatastoreException: Encountered "r" at line 1, column 157.
Was expecting one of:
<EOF>
"and" ...
"group" ...
"limit" ...
"offset" ...
"order" ...

That's why the single quotation is escaped as the sssname is included in the query string. After the query, the filter looks like this,
filters {
property_filter {
property {
name: "sssname"
}
op: EQUAL
value {
string_value: "print(*objects, sep=\' \', end=\'\n\', file=sys.stdout, flush=False)"
}
}
}
So, the sssname present in the filter and the sssname present in the content kind will not match. I thinks that's why it can't able find the matching document.

If we don't do escape single quotation, it will throw this error
SEVERE: com.google.cloud.datastore.DatastoreException: Encountered "r" at line 1, column 157., If we do escape single quotation, it will not find the comaparable document for document 60 of Lib ref DT.

#2

Updated by Venmuhilan B about 2 years ago

*Fix:
Used *PropertyFilter
instead of queryString to avoid escaping single and double quotes in section Names.
reference - https://cloud.google.com/datastore/docs/concepts/queries

MR - https://gitlab.com/kordale/rapidken-j/-/merge_requests/1474

#3

Updated by Venmuhilan B about 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
#4

Updated by Ayush Khandelwal about 2 years ago

  • Due date set to 09/08/2022
  • Priority changed from Normal to Urgent
  • Estimated time set to 2.00 h
#5

Updated by Venmuhilan B about 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Venmuhilan B to Ayush Khandelwal
#6

Updated by Ayush Khandelwal about 2 years ago

  • Status changed from Feedback to Closed

Working as expected on QA

Also available in: Atom PDF