Discussion:
[fpc-pascal] Searchable docs online
Michael Van Canneyt
2018-07-05 13:50:23 UTC
Permalink
Hello,

Given the questions of late, I have created a search page for the docs:

https://www.freepascal.org/docsearch/docsearch.html

This will search in the manuals, and in the reference documentation for the
units.

There is ample room for improvement, but the page already works.

Things to improve:
- Allow 'contains'
- Allow 'minimum rank' (rank is the number of times a word appears in a page)
- Allow to specify in which manual you want to search.
- Integrate searching in the doc pages themselves.

The underlying mechanisms for this search are 100% FPC based:
fpindexer, fcl-web, and the webpage logic is done using pas2js.
(meaning you need to have Javascript enabled)

Feedback and comments welcome.

Michael.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org
Rainer Stratmann
2018-07-05 14:06:09 UTC
Permalink
Is the server itself written in freepascal?
Or is it apache or nginx?
Post by Michael Van Canneyt
Hello,
https://www.freepascal.org/docsearch/docsearch.html
This will search in the manuals, and in the reference documentation for the
units.
There is ample room for improvement, but the page already works.
- Allow 'contains'
- Allow 'minimum rank' (rank is the number of times a word appears in a
page) - Allow to specify in which manual you want to search.
- Integrate searching in the doc pages themselves.
fpindexer, fcl-web, and the webpage logic is done using pas2js.
(meaning you need to have Javascript enabled)
Feedback and comments welcome.
Michael.
_______________________________________________
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://list
Michael Van Canneyt
2018-07-05 14:13:29 UTC
Permalink
Post by Rainer Stratmann
Is the server itself written in freepascal?
Or is it apache or nginx?
The search server is a single program which is switchable between CGI and
standalone HTTP server using a define.
I use HTTP server for development, it is deployed as CGI.

Michael.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/list
Jan Kampherbeek
2018-07-06 10:00:07 UTC
Permalink
Thanks! This comes in very handy :-)

Jan Kampherbeek
Post by Michael Van Canneyt
Hello,
https://www.freepascal.org/docsearch/docsearch.html
This will search in the manuals, and in the reference documentation for the
units.
There is ample room for improvement, but the page already works.
- Allow 'contains' - Allow 'minimum rank' (rank is the number of times
a word appears in a page)
- Allow to specify in which manual you want to search.
- Integrate searching in the doc pages themselves.
fpindexer, fcl-web, and the webpage logic is done using pas2js.
(meaning you need to have Javascript enabled)
Feedback and comments welcome.
Michael.
_______________________________________________
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailma
Ryan Joseph
2018-07-08 17:23:37 UTC
Permalink
Just tried to use https://www.freepascal.org/docsearch/docsearch.html and it seems to have a bug (not working, errors in the JS console). Awaiting the source on svn also. :)

Regards,
Ryan Joseph

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mail
Michael Van Canneyt
2018-07-08 19:07:15 UTC
Permalink
Post by Ryan Joseph
Just tried to use https://www.freepascal.org/docsearch/docsearch.html and it seems to have a bug (not working, errors in the JS console). Awaiting the source on svn also. :)
Possibly, I have been doing some experiments. I have re-enabled it.

It is now also referred to from the main docs page:
https://www.freepascal.org/docs.var

The search term edit box now has type-ahead enabled.

Sources (webpage/server) can be found on:
https://svn.freepascal.org/svn/html/docsearch/

The server needs the latest fpindexer:

https://svn.freepascal.org/svn/fpc/trunk/packages/fpindexer/

The indexer works using postgres, but sqlite, firebird (in fact any SQLDB DB) are
also supported. There is also support for a custom file format.

The "client" is written in pas2js.

So it comprises now a full-fledged example of how FPC can be used as a
full-stack web development environment.

In a couple of moments, I will commit a more general version of the
HTML searchengine under fpindexer examples.

Michael.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinf

Continue reading on narkive:
Loading...