Hi David,
This is the query that led me to the other issue. I'm trying to figure out how I can extract information about the match for the query. I'm potentially indexing a lot of fields that are already stored externally, and I don't want to use Ferret as the database. I've spent most of the day sifting through the Ferret C source, and I think I finally see a couple of ways to do it, but I was wondering if I was missing something obvious.
Ideally, what I'd like is either the matching fields (and the offsets and length if so configured) to be part of the Hit information you get from #search or #search_each so that I could know which fields to show to the user without resorting to the hack used in the previous issue report. Is this already part of the API?
Looking at the code, one approach would be to bubble this up from the various terms through the boolean and have it part of the core Scorer C structure. I don't see how to get the offsets this way, however.
Do you have any idea how much work it would be to add this to Ferret? I'm not sure my C chops are up to the task, and I'm still somewhat fuzzy about how the whole thing fits together.
It would be extremely useful for my project.
Cheers,
ast
Hi David,
This is the query that led me to the other issue. I'm trying to figure out how I can extract information about the match for the query. I'm potentially indexing a lot of fields that are already stored externally, and I don't want to use Ferret as the database. I've spent most of the day sifting through the Ferret C source, and I think I finally see a couple of ways to do it, but I was wondering if I was missing something obvious.
Ideally, what I'd like is either the matching fields (and the offsets and length if so configured) to be part of the Hit information you get from #search or #search_each so that I could know which fields to show to the user without resorting to the hack used in the previous issue report. Is this already part of the API?
Looking at the code, one approach would be to bubble this up from the various terms through the boolean and have it part of the core Scorer C structure. I don't see how to get the offsets this way, however.
Do you have any idea how much work it would be to add this to Ferret? I'm not sure my C chops are up to the task, and I'm still somewhat fuzzy about how the whole thing fits together.
It would be extremely useful for my project.
Cheers,
ast