A method and apparatus for searching data to locate a portion identified by a
search
query. The data may comprise text files in a database. The search query comprises
two or more data fragments expected to be contained in the portion of data being
sought and in any order. The method comprises receiving the data fragments and
searching the data to locate matches between the data and the respective data fragments.
Any overlapping matches are discriminated and replaced by an iterative search process
until there is found a minimal portion of the data containing all of the data fragments
without overlaps, the term minimal meaning a portion with only one complete set
of the data fragments (though some but not all can be duplicated). The identified
portion of text can be highlighted in a display of the data.