Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/carquinyol/indexstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@
# Force a flush after _n_ seconds since the last change to the db
_FLUSH_TIMEOUT = 5

_PROPERTIES_NOT_TO_INDEX = ['timestamp', 'preview', 'launch-times']
_PROPERTIES_NOT_TO_INDEX = ['timestamp', 'preview', 'launch-times',
'reflections', 'next_steps']

# Key prefixes whose values are binary blobs, not words.
_PREFIXES_NOT_TO_INDEX = ['moment-snap-']

_MAX_RESULTS = int(2 ** 31 - 1)

Expand Down Expand Up @@ -114,6 +118,9 @@ def _index_unknown(self, document, properties):
def _index_property(self, doc, name, value, prefix=''):
if name in _PROPERTIES_NOT_TO_INDEX or not value:
return
for skip in _PREFIXES_NOT_TO_INDEX:
if name.startswith(skip):
return
value = str(value)

# We need to add the full value (i.e. not split into words) so
Expand Down