TODO
----

 General development directions

* More various databases support.
* More various transport protocols support.
* More various APIs. e.g write Java class with libudmsearch support.
* Support for huge databases with hundred or thousand millions documents.
* Make it more managable, i.e. administration tools, etc.


  Below there are things that can be implemented somewhere in the future.
They are given in no paticular order. If you want to change the order of
their development, please ask on general@mnogosearch.org.


Search quality and results presentation
---------------------------------------
* Click rank
* Administator defined dynamic site priority:
	- approved sites which should be displayed in the top of results;
	- disapproved sites (e.g. for abuse) which should not be displayed.
* Take in account words context: <b>, <font size="xx">, <big> and so on.
* Optional automatic URL limit by SERVER_NAME variable.
* "Exclude" limits, for example "to search though everything except
  given site": ue=http://esite/
* Fuzzy search for accent letters, for example cyrillic "io" and "ie".
* Regex search
* Rank URLs with long pathnames lower than direct hits on let's say a domain 
name with no directory path.
* Various search results ordering, e.g. by date.


Indexing related stuff
----------------------
* Detect clones on site level. Currently it is implemented on page level
only. The idea is to detect that site being indexed is a mirror of another
site without having to index all pages but after indexing several pages only.
* SPAM clearance.
* Fix that indexer bacame slow when ServerTable is big. This is because
of full consecutive examination. Make in-memory cache for ServerTable part.
* Fix that "posgreSQL.org" and "posgresql.org" are considered as a
different sites.
* FTP digest ls-lR.gz support. For example,ftp://ftp.chg.ru/ls-lR.gz
* Make it possible for external parsers to return converted content 
together with headers like Content-Type, Title and so on.
* Exclude autoincrement mode for 'url' table. We have to use CRC32 mode
  since it is much faster for indexing and probably would take less space.


Charset related stuff
---------------------
* Remove "ForceIISCharset1251 yes/no"command. Replcase it with 
enhanced "CharsetByServer <charset> <regexp> [<regexp>...]" 
commmand.
* Stateful character sets support: UTF-7, Asian ISO-2022-XX
and others. They will not be used as a LocalCharset because
of much space, however indexer should be able to index them,
as well as search frontend should be able to use them as
a BrowserCharset.


Misc
----
* Smart search results cache cleaning after reindexing.
* Make it possible to set table names in indexer.conf and search.htm
* There was a discussion about word separators back in January; see 
http://www.mail-archive.com/udmsearch%40web.izhcom.ru/msg00200.html.
* Learn about dublin core. A simple set of standard metadata for web pages.
  http://www.searchtools.com/related/metadata.html#dc
* Add curl library support.
* Rewrite mirroring functions. Make it possible to optionally store whole 
document, not only MaxDocSize.


Portability and code quality
----------------------------
Remove warnings on various platforms. Currenly it is built without
warnings on Linux and FreeBSD with these CFLAGS:

-Wall 
-Wconversion 
-Wshadow  
-Wpointer-arith 
-Wcast-qual 
-Wcast-align 
-Wwrite-strings  
-Waggregate-return  
-Wstrict-prototypes  
-Wmissing-prototypes 
-Wmissing-declarations 
-Wredundant-decls 
-Wnested-externs 
-Wlong-long 
-Winline

However some other platform compilers do produce warnings.
For example, mixed signed/unsigned chars on NetBSD Alpha compiler. 
Please report those warnings to general@mnogosearch.org!


Documentation
-------------
* Constantly improve it!
* PDF version.



Things that will most likely be done in 3.3 (in no particular order)
--------------------------------------------------------------------

1. Better relevancy
   - separate word enumeration for each section
     and add number_of_words_in_this_section into coord, i.e. 
     "section + position_inside_section + number_of_words_in_this_section"
     instead of
     "section + position_inside_document"
     Note, number_of_words_in_this_section doesn't need to be exact,
     it can be approximate, to safe space.
   - Use number_of_words_in_this_section in relevancy formula,
     i.e. be close to the classic TF*IDF rank algorithm.
   - better "body" capacity (get rid of "64K words in body" limit)
     and more sections (reg rid of "256 sections" limit).
     It can be done using dynamic encoding, e.g.
     128 sections with 256*256*256 words plus
     128*256 sections with 256*256 words.

2. Cluster
   - Res2XML (built-in XML template)
   - XML2Res (to parse built-in XML template)
   - DBAddr http://hostname/path/to/searchxml.cgi
   - Make it possible to run search.cgi as a HTTPD server
   - Site enumerating without having to talk to each cluster node
     (e.g. crc48 or crc56, with direct encoding for short names)
   - Clone detection at search time
   - Configurable distibution type: by site_id, by seed, etc.

3. Extend SQL drivers to use prepared statements in sql.c
   - Prepare/Bind/Exec for MySQL
     (using mysql_escape_string or hex notation for 4.0,
      or using PS API for 4.1 and later)
   - Prepare/Bind/Exec for PgSQL
   - Prepare/Bind/Exec for Interbase
   - Prepare/Bind/Exec for SQLite3
   - Prepare/Bind/Exec for CTLib
   - Modify sql.c to use Prepare/Bind/Exec for all databases
   - DBMode=blob for Interbase 
   - DBMode=blob for sqlite3?

4. DBType=myinnodb (and maybe for other handler types)
   - scripts MySQL with Engine=InnoDB
   - true transactional code in sql.c, instead of LOCK TABLE.

5. More concurent "indexer" safety
   - test with concurrent indexers with all databases
   - Use FOR UPDATE
     LOCK TABLE IN SHARE MODE
     LOCK TABLE IN EXCLUSIVE MODE

6. More multithread safety
   - test with multiple threads
   - better robot.txt locking
     Currently all threads are waiting for a single thread
     to fetch robots.txt file, independently of host name.
     It can be done by implementing of a shared array
     of "robots.txt currently being fetched".

7. DBMode=blob improvements
   - RENAME TABLE for more databases
   - Partial incremental "indexer -Eblob"
   - Configurable choice to run partial or full
     "indexer -Eblob", depending on amount
     of new data collected.
   - Put information from "url" into "bdict" table ???
   - Put information from "urlinfo" ???

8. Database consistency check (and maybe pepair) tools,
   - e.g. report (and/or remove) all bdicti/urlinfo records
   which don't have corresponding url records.
   - don't put lost url records during "indexer -Eblob" run,
   generate warnings if found lost records.

9. Source code and packaging improvements
   (see some more info added by svoj in TODO.ru)
   - more separate files (e.g. break utils.c)
   - dynamically loadable database modules
   - build statically linked (platform independent) and
     dinamically linked (distribution-specific) RPMs,
     FreeBSD packages and so on.

10. mnoGoSearch benchmark suite
   - tiny (~1000 documents)
   - medium (~10000 documents
   - huge (~1000000 documents)

11. Windows version
   - Unix compatible indexer.conf
       - UdmEnvWrite()  (can be done by a Unix developer)
       - GUI for all missing important commands
       - GUI for "extra" (i.e. not so important) commands 
   - package prepared plugins, for example for ispell or external parsers,
     to reduce manual actions required from user.

12. API improvements (PHP, ASP, Perl) ???
   - Stabilize and document C API.
   - Put module code into the main tree,
     add --with-php, --with-perl, and so on, options to configure.
   - Add "PHP via COM" frontend example (Windows)

13. Better internationalization (from Yannick LE NY)
     http://www.mnogosearch.org/board/message.php?id=17948
   - add i18n templates 
   - use gettext to i18n the indexer binary help and messages.

14. Documentation
   - Full step-by-step instructions how to install and configure mnoGoSearch

15. Support for Internationalized domain name:
    http://en.wikipedia.org/wiki/Internationalized_domain_name
    Maybe using GNU IDN Library: Libidn http://www.gnu.org/software/libidn/

