Fwd: Is there a front-end for using xapian-omega rather than the terminal? Could a Xapian database be accessed from web-browsers?
Olly Betts
olly at survex.com
Mon Apr 22 03:50:38 BST 2024
On Thu, Apr 18, 2024 at 03:46:53PM +0530, Susmita/Rajib wrote:
> On Thu, 18 Apr 2024 at 06:24, Olly Betts <olly at survex.com> wrote:
> > You may need to configure apache to tell it to use this for a URL on
> > your site.
>
> How Mr. Betts? Suppose I have a ready open document text file, a
> LibreOffice text file. say BettsBio.odt, for which I want to create an
> index file, say, BettsIndex.txt.
A Xapian index is not a text file, rather it's a directory of binary
files, so naming it `.txt` would be confusing.
> Please assume that I have used Recoll on BettsBio.odt to create a
> xapiandb directory and had the database created there already.
>
> How do I configure Apache for the purpose to use a web-browser?
This isn't really the right place to seek help in setting up a
particular webserver, and it's also not really my area of expertise,
but the relevant apache documentation is here:
https://httpd.apache.org/docs/2.4/howto/cgi.html#configuring
> How do I write the command line to access the web-browser?
You don't.
You configure apache to map a URL on the website it is serving to the
omega CGI, which might be
https://example.org/cgi-bin/omega
or
https://example.org/omega.cgi
(which correspond to the ScriptAlias and AddHandler approaches in
the Apache docs).
Then when a web browser loads that URL, the page it loads is generated
by omega CGI program on the server.
> How do I have omega create the text database with extensive location
> info of words or phrases within the doc?
Use the omindex program that comes with xapian-omega.
It may be possible to create a database with Recoll and search it with
the omega CGI, but whether that works properly depends on exactly how
Recoll indexes its documents which I'm not familiar with. There's a
lot of flexibility in how you can use a Xapian database, and
xapian-omega makes some assumptions (which are matched by omindex but
may not be by every program which can create a Xapian database).
There's not a good reason to mix and match in this case though as
omindex can index all the common formats (and many less common ones).
Cheers,
Olly
More information about the Xapian-discuss
mailing list