DRAFT of specification if Indexing By words for strings.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Sep 22 09:09:33 CDT 2004


Hello all,

After jda letters, I have start to think in this direction.
This is my thoughts.

* We must be able for any Index_String assign additional optional
parameters.

    IgnoreLength -- integer value,
        words with such length and less will be ignored by index.
    
    IgnoreWords -- some internal list of User-defined words which
        must be ignored by this index.



* At first I was going to implement this as features of Index itself.

    but I have ask self, where must be stored ListOfWords ?
    and how.

    it is obvious that it cannot be in the .ind file.
    it must be in the .vdb file.

    So now we know WHERE it must be.


* But then this "feature of index" become declarative feature.
    it is separated from index itself.

  (!) it becomes feature of a field actually.


* if expand mind more, it is possible to see developer can have cases when
few fields, may be even from different tables, should ignore the same words.

    then we come to next idea:

    - above 2 parameters must construct new abstraction: IndexStrPrefs
    - this must be feature of database level.
    - it must have own unique name.
    - we will assign a specific IndexStrPrefs to a field by name.


* So we should have something as:

    class IndexStrPrefs

    db.CreateIndexStrPrefs( name )      // error: name not unique

    
    IndexStrPrefs.name
    IndexStrPrefs.IgnoreLength
    IndexStrPrefs.IgnoreWordsCount

    IndexStrPrefs.AddWord( String )
    IndexStrPrefs.DeleteWord( String )
    IndexStrPrefs.DeleteAllWords


    Vstring.UseIndexPrefs( prefsName )



* after changes of prefs, EXISTED index must be rebuild.

    
* also it needs to invent how to store this in the .vdb file.
    I do not like idea of putting this into system tables.
    it can blow out number of records.
    

    Aha, no.

    we will make new element, and words we will store into ValueText field.
    in the format 
            aaa bbbb ccc dddd eeee ...


Looks to be very flexible. And in future we will be able extend number of
options of parameters of IndexStrPrefs.



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list