Author Topic: Disabling search of words in contentNotes  (Read 2165 times)

0 Members and 1 Guest are viewing this topic.

heikok

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Heinzelnisse
Disabling search of words in contentNotes
« on: 14. July 2009, 22:06:58 »
I have set up a dictionary with contentNotes, i.e.

language1Content01DisplayText: contentGrammaticalCategory
language1Content02DisplayText: contentNotes

i.e.
aufbleiben [01v] [02im Sinne von nicht ins Bett gehen]  holde seg oppe [01v]

This works as expected if I search for 'aufbleiben', but I get that line, too if I search for e.g. 'gehen'. I don't want  the words in the contentNotes to be searchable. How can I disable that?

Best regards,

Heiko

Gert

  • DFM J2ME/Mobile Developer and Project Leader
  • Administrator
  • *****
  • Posts: 862
    • View Profile
    • DictionaryForMIDs
Re: Disabling search of words in contentNotes
« Reply #1 on: 16. July 2009, 18:19:36 »
Ok, understood. Hmmm, something like a property "languageXContentNNIsSearchable" (default value: false) would be a very useful improvement !

Well, until someone does implement a languageXContentNNIsSearchable, you can handle your problems as follows:

Basically you can control which information goes to the search index or not via the DictionaryUpdateClass (http://dictionarymid.sourceforge.net/newdictDictionaryUpdate.html).

DictionaryGeneration comes with the class DictionaryUpdatePartialIndex. If you set DictionaryUpdatePartialIndex as DictionaryUpdateClass, then the text between {{ and }} will not be included in the index.

In your example:
aufbleiben {{[01v]}} {{[02im Sinne von nicht ins Bett gehen]}}  holde seg oppe {{[01v]}}

Hmmm, is there a documentation of DictionaryUpdatePartialIndex somewhere on the web pages ... ?

Anyway, let me know if you have a problem with DictionaryUpdatePartialIndex.

Best regards,
Gert

heikok

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Heinzelnisse
Re: Disabling search of words in contentNotes
« Reply #2 on: 19. July 2009, 14:56:20 »
I used now the DictionaryUpdatePartialIndex solution, and it works great. Dictionary is back to normal size, and dictionary generation time drops again from 3 minutes to 5 seconds.

Thanks,

Heiko

Gert

  • DFM J2ME/Mobile Developer and Project Leader
  • Administrator
  • *****
  • Posts: 862
    • View Profile
    • DictionaryForMIDs
Re: Disabling search of words in contentNotes
« Reply #3 on: 19. July 2009, 17:44:22 »
Fine :)

Now we just need to put online some documentation about this nice DictionaryUpdatePartialIndex-class. I believe there is not yet a documentation on this.

Gert