Mumbai, India
ecmnotes.com parag@ecmnotes.com

Searching

List all searchable attributes:

SELECT attr_name, type_name FROM dmi_dd_attr_info WHERE is_searchable = 1 ORDER BY type_name

List all searchable dm_document attributes:

SELECT attr_name FROM dmi_dd_attr_info WHERE is_searchable = 1 and type_name = 'dm_document'

 Display information about the full-text index:

SELECT * FROM dm_fulltext_index

List all the documents which contain the set of words:

SELECT * from type_name(all) SEARCH FIRST DOCUMENT CONTAINS 'word1' and 'word2'

List all the documents which contain the exact phrase:

SELECT * from type_name(all) SEARCH FIRST DOCUMENT CONTAINS 'phrase'

List all the documents without any of these words:

SELECT * from type_name(all) SEARCH FIRST DOCUMENT CONTAINS NOT 'word1' or NOT 'word2'

List all the documents without these words:

SELECT * from type_name(all) SEARCH FIRST DOCUMENT CONTAINS NOT 'word1' and NOT 'word2'

Leave a Reply