fergiemcdowall on 577-string-values-consisting-only-of-special-chars-break-tokenization-chain
fergiemcdowall on master
version bump Merge pull request #580 from fe… (compare)
fergiemcdowall on 577-string-values-consisting-only-of-special-chars-break-tokenization-chain
version bump (compare)
favoriteposts
finds hits, but favoritePosts
(large 'P') doesn't
caseSensitive: true
then the field name favoritePosts
works as expected
if you initialize search-index with caseSensitive: true then the field name favoritePosts works as expected
Thanks, I'll try that
;(async () => {
const si = require('search-index')
const print = txt => console.log(JSON.stringify(txt, null, 2))
const db = await si({
name: 'arrays'
})
const data = [
{
name: 'Homer Simpson',
favoritePosts: ['content/posts/welcome3.md'],
_id: 'content/authors/homer.md'
}
]
await db.PUT(data)
await db
.QUERY({
FIELD: ['favoriteposts'],
VALUE: 'content/posts/welcome3.md'
})
.then(print)
})()
'content/posts/welcome3.md'
(no array), then special chars will be be stripped and the string will be tokenized
Would
const data = [
{
name: 'Homer Simpson',
favoritePosts: ['content/posts/welcome3.md', 'content/post/welcome4.md'],
_id: 'content/authors/homer.md'
}
]
Be indexed as 'content/posts/welcome3.md'
and 'content/posts/welcome4.md'
as separate fields somehow (sorry, might be a confusing question)
level-out
to inspect the index
search-index@3
(coming soon)
"bøker er gøy"
are not always tokenized correctly
ø
)
['bøker er', 'er gøy']
VALUE: 'another'
comments: ['doh', 'this is another comment']
would allow you to search for VALUE: 'doh'
and VALUE: 'this is another comment'