-
Notifications
You must be signed in to change notification settings - Fork 0
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
ftsearch fails #1
Comments
ftsearch is broken and buggy. The Shoes manual is considerably bigger, so you may have better result with a bigger text file. I had already moved away from ftsearch in favour of Picky. |
it seems Picky needs some sort of struct to index. Do you have that code or do we have to figure it out? |
Picky is building an index database to ensure a speedy search lookup. Shoes will have to prebuild this index database for Shoes Manual before each release, to let the end-users enjoy the manual without having to wait (e.g. fontconfig issue). We can write a Rake task for this purpose.
I have to code somewhere. Let me get back to you on this one. It's however very easy: I simply replaced the ftsearch API calls with Picky, plus added some parameters to allow Picky to behave the same way Shoes Manual search was before. |
Oops. My apologies. I thought you were talking about the database. The struct is used to build the search database. You can say, for example, each item is composed of a title and a description. Thereafter you can search by titles and/or descriptions. |
I fixed the Windows fontconfig a release or two back in Shoes - now it uses Windows APIs to build the Shoes font list instead of the fc-cache/FONTCONFIG_FILE ugliness. - you can even have multiple Shoes installed without fighting over fontconfig. - or getting two paths stuck in the env var. The FONTCONFIG_FILE is no longer used. exe-shoes would not be possible without that fix. When an author decides to 'publish' his ebook (create a .exe if he's running Windows) we can save the picky index then and include it in the merge of his Shoes and his ebook (app). |
Check your emails. I found the code for Picky to replace ftsearch. Should be working right out of the box but haven't tried lately. Enough to get you started anyway. Enjoy.
Very glad to read about it.
Agreed. |
As a reference, the code I submitted to you through email, there is the structure you are looking for. Additionally, the members of the structure are used as searchable terms category :uri and category :body, id is always implied. Members of the structure not declared to Picky may not be searchable, it may not know how to retrieve it, hence a block is provided to Picky to process its member accordingly. Document = Struct.new :id, :uri, :body Picky # ...
category :uri, :from => lambda { |doc| doc.uri.dup }
category :body, :from => lambda { |doc| doc.body.dup }
#... |
Additional references on Picky issue #142 and Picky issue issue #139. |
Picky is working instead of ftsearch so I'm closing this issue. There can can be many issues. This one was narrow. |
This chunk of code from @backorder fails somewhere in ftsearch (as many things do) but we have to start somewhere.
The text was updated successfully, but these errors were encountered: