You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A distinct merged struct can be created from the above like so:
enumSearchableType{case Foo
case Bar
}structSearchable{letidentifier:Stringlettitle:Stringletkeywords:[String]?letauthor:String?letsummary:String?lettype:SearchableType}
View
For my search view, I need to show both matching types (Foo and Bar) based on the user's input.
Question
As per the documentation for FTS, the YapDatabaseFullTextSearch initialiser takes a columns argument with propertiesToIndex as its value.
In my case, title and identifier are the only common property across the two models. What the documentation is unclear about are conditional values for the columns.
A: Assuming that conditional values are unsupported (i.e. the FTS module would not like NULL values in these columns), should I create two separate handlers and YapDatabaseFullTextSearch extensions for each struct (and forego the merged struct)?
B: If conditional values are supported, do I need to take additional care when writing the queries for fetching results? Repurposing one of the examples from the documentation:
Does the FTS module take care of only looking at non-NULL values in its table? Or do I need to modify the above query to explicitly tell it to skip over NULL values?
The text was updated successfully, but these errors were encountered:
I'm theorising my solution for implementing Full Text Search, and I had a few questions to ensure my understanding of the module is correct.
Full Disclosure; I have not tried writing or experimenting with any code.
Models
I have two distinct model objects which I need to index for using with YapDB's FTS module.
A distinct merged struct can be created from the above like so:
View
For my search view, I need to show both matching types (
Foo
andBar
) based on the user's input.Question
As per the documentation for FTS, the
YapDatabaseFullTextSearch
initialiser takes acolumns
argument withpropertiesToIndex
as its value.In my case,
title
andidentifier
are the only common property across the two models. What the documentation is unclear about are conditional values for the columns.A: Assuming that conditional values are unsupported (i.e. the FTS module would not like NULL values in these columns), should I create two separate handlers and
YapDatabaseFullTextSearch
extensions for each struct (and forego the merged struct)?B: If conditional values are supported, do I need to take additional care when writing the queries for fetching results? Repurposing one of the examples from the documentation:
Does the FTS module take care of only looking at non-NULL values in its table? Or do I need to modify the above query to explicitly tell it to skip over NULL values?
The text was updated successfully, but these errors were encountered: