Search This Blog

Saturday, May 23, 2015

How to force UNK table to "see" required type of a field (to use it in FTSearch, for example)

Hi

If you work with Full-Text search a lot you could get into situation when your database considers field type incorrectly, f.x. it may recognize some field as a number when it is actually a text on a Form so you can't use FT-query like [FieldName]=*partOfText*. Usually it happens when you change field type on a form but your database already contains documents with items based on old-type-fields.

Though IBM knowledge base provides suggestions how to fix such issues it's rather tricky thing to fix. At least the steps suggested by IBM had never worked for me - I mean deleting FT-index and then copy-style compacting. However I found my own. Here is the magic formula...



1) Create a replica stub of a target database. I mean a replica that is created after you disable checkbox "Create immediately"

2) Create a blank template database and replace design of your replica stub to make it initialized


3) Open your initialized blank replica in Domino Designer, create any form, add there field(s) which types were recognized incorrectly earlier, create a single document based on this form and then create Full-text index for this replica. This time full-text index will be created correctly.



4) Replicate your blank replica with the full replica so all documents and design elements will get to your replica with correct full-text index.

5) Do final steps:
- remove test form and test document
- restore database launch options or any other database properties (should be fast and easy)
- remove old replica and start using new one.









6 comments:

  1. "replica header" aka replica stub

    ReplyDelete
  2. thank you Carl, I will update my post then :-)

    ReplyDelete
  3. This doesn't work as of Notes 9.0.1FP10. I get: "Design Replace Failed, This file is being initialized or repaired and will be available once the operation is complete."

    ReplyDelete
  4. My understanding is that it is the documents rather than the form design that informs the UNK table. It may be possible to use the replication formula to initially only allow a single well formed document to be indexed before then modifying the formula to allow all of the documents to replicate.

    see https://twitter.com/john_d_curtis_/status/1351509969787641856

    ReplyDelete
    Replies
    1. Hi, thanks, I agree, replication is a good option as well.

      Delete
  5. Update : the UNK table seems to be populated by the form design attributes first and then the documents for any remaining fields

    ReplyDelete