Replies: 6 comments
-
@karelg could you provide more details? It should be possible to define and perform Full-Text search for set of the fields. Have you checked http://jasperfx.github.io/marten/documentation/documents/customizing/full_text/? |
Beta Was this translation helpful? Give feedback.
-
I'm sorry for not being clear enough. What I meant was, we can not query by specific full-text indexed fields. Would be awesome, if we could do something like this for example: |
Beta Was this translation helpful? Give feedback.
-
@oskardudycz Full text indexes can be defined per property BUT they can't be searched per property. |
Beta Was this translation helpful? Give feedback.
-
@karelg @kasparkallas in fact if you define the full text index for the limited number of fields then during the Search call it's trying to find the index for that document and selected language configuration. If it finds it then it's using it, if not then it's using whole document. So if you define the full text index for That should be imho sufficient for the most of the cases, also you need to be aware that if you create and index for eg. 3 properties and try to search for only one of them then it won't be performant, as it won't be used the defined index. We could consider giving possibility to specify the subset of fields in the search, but imho it's not ideal as it'll suggest the user that it will be properly using defined index, while it might not be true. Besides the tests linked above, see the logic for finding right index during full text search: https://github.com/JasperFx/marten/blob/master/src/Marten/Linq/WhereFragments/FullTextWhereFragment.cs#L40 |
Beta Was this translation helpful? Give feedback.
-
@oskardudycz What if we could specify index name in search? Like so: |
Beta Was this translation helpful? Give feedback.
-
@karelg to be true I don't see huge benefit of specifying such event name, especially that not always it's defined by user, usually it's the autogenerated name. I personally would prefer to log warning if the index was not found. We could think about extending the api to allow to specify the where statement properties list, although I'm not sure how soon (as imho currently it's possible to achieve the same). But we take pull request - if you're willing to provide that I could try to guide you :) For sure it seems that we need to at least update the documentation to explicitly descibe how it works now - I can handle that. |
Beta Was this translation helpful? Give feedback.
-
Currently Marten supports full-text searches only over document scoped indices. It would be very handy, if we could define multiple indices for different document fields and also perform full-text searches on these fields.
Beta Was this translation helpful? Give feedback.
All reactions