-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searching in Swift? #13
Comments
Ok--I think it has to do with the default field names that BRFullTextSearch has set. There's no easy way to change this if using CocoaPods--will recompile with a dependent project and use my own field keys and see if that'll work. |
The problem actually was that the built-in search code was using the wrong analyzer for my indexes. It seems really weird that I have to full-on edit the Framework to change these settings. Can they be changed anywhere in my code and leave the library as-is? The snowball analyzer is hard-coded into Once I changed this method to what I have here:
it worked perfectly. I also had to change the field keys. That seems like something that should definitely be in a setting/property. I do get that Lucene and BRFullTextSearch was built to used to both create and search documents (and thus negating the need to set your own field keys or analyzer types). Creating an index from elsewhere and importing it into a project wasn't the first consideration--so I understand these design choices. |
Hi @keehun, Some parts of this API have not been exposed for extensibility or configurability yet, as you have discovered. This is more from time constraints rather than oversight. In your case, the The Thanks for your feedback! |
@keehun I forgot to also mention, you can set
to YES to turn off stemming, which makes the |
Hi,
Been trying to get search to work in Swift. I've spent the last week or so figuring out how to scrape a lot of HTML and have about 220,000 documents in Lucene. Searching with Java works really well. Exactly what I need.
Now I'm trying to bring it to iOS with Swift. I've got the framework set up correctly, and the CLuceneSearchService class initializes fine.
When this code runs, it always returns 0. I'm not sure if:
Any pointers on why this isn't working? The term "piano" should hit many terms (134 hits in the Java code).
Thanks
p.s. Here's the Java code for the search:
The text was updated successfully, but these errors were encountered: