Closed parthgandhi7 closed 8 years ago
Hi @parthgandhi7 . Thanks for the PR and this is definitely a good idea. This was discussed in https://github.com/medic/lucene-query-generator/pull/3 too. I think the api I prefer is being able to pass a string or an object for schema type, so you could say name: { type: 'string', allowSpecialCharacters: true }
. This makes sense to me because the field type is still a string - it's adding a separate flag to disable the escaping.
Would that work for you?
If you have time to update this PR with that format that'd be great. If not, I'll try to get on to it next week.
This allows partial search functionality. Like if we search for
'name: che*
', we should get all the results containing cheese, chess etc. AddednoFormat
flag for by passing the string conversion as for the partial search to work, the key value pair should go as it is without any double quotes around the value.