refine search
This commit is contained in:
parent
e18ca2fee8
commit
7d088cdd0b
|
@ -286,7 +286,7 @@ export default {
|
|||
type: 'most_fields',
|
||||
fields: ['title^20', 'text'],
|
||||
minimum_should_match: '100%',
|
||||
boost: 40
|
||||
boost: 400
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ export default {
|
|||
fuzziness: 'AUTO',
|
||||
prefix_length: 3,
|
||||
minimum_should_match: '100%',
|
||||
boost: 2
|
||||
boost: 20
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -308,6 +308,7 @@ export default {
|
|||
type: 'most_fields',
|
||||
fields: ['title^20', 'text'],
|
||||
fuzziness: 'AUTO',
|
||||
prefix_length: 3,
|
||||
minimum_should_match: '60%'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import Pin from '../svgs/pushpin-fill.svg'
|
|||
import reactStringReplace from 'react-string-replace'
|
||||
|
||||
function SearchTitle ({ title }) {
|
||||
return reactStringReplace(title, /:high\[(.+)\]/g, (match, i) => {
|
||||
return reactStringReplace(title, /:high\[([^\]]+)\]/g, (match, i) => {
|
||||
return <mark key={`mark-${match}`}>{match}</mark>
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue