internetarchive / bookreader

The Internet Archive BookReader
https://openlibrary.org/dev/docs/bookreader
GNU Affero General Public License v3.0
998 stars 419 forks source link

How to embed full text search in bookreader? #26

Open marcolino opened 11 years ago

marcolino commented 11 years ago

The openlibrary/bookreader demo does not include text search. Is it possible to enable it? (on openlibrary.org, for example at http://www.archive.org/stream/awakeningofsprin00wedeiala#page/n5/mode/2up, it's alive and kicking... :-) Of course I know I will have to OCR all of my books and have the coordinates of the boxes of all the words for all the pages for all the books...

symac commented 11 years ago

It is possible yes, we use it on our digital library there : http://1886.u-bordeaux3.fr/items/show/1384 use the tab "Consulter" and you'll be able to search a string (search "belsunce" for example). You need to associate with your reader a page that will answer to a query by giving the coordinates of the words matching ( http://1886.u-bordeaux3.fr/book-reader/index/fulltext/fulltext/?item_id=1384&doc=1384&path=http://1886.u-bordeaux3.fr/&q=belsunce&callback=br.BRSearchCallback for example).

marcolino commented 11 years ago

Can you please specify in detail the libraryes you use? I started from the demo, and it does not include the test search code... And, did you build the "page that will answer to a query by giving the coordinates of the words matching", or you used something from the library?

symac commented 11 years ago

Yes, the page that returns the x,y of every word has been developped by us, it's not available via Internet Archive plugin as far as I know.

To add the searchbox in the demo you need to comment (or remove) the following line : $('#textSrch').hide(); available at the end of BookReaderJSSimple.js file in BookReaderDemo directory.

sandipprajapati7720 commented 9 years ago

i have already show that text box thought the result cant find let me know what exactly step to implement that plz give me proper documentation.