摘要 |
Generating a document index comprises: obtaining a document to be indexed; performing a monadic partition operation on the document to obtain a plurality of monadic partitions; and for each monadic partition in the plurality of monadic partitions: determining whether said each monadic partition is a filter character; in the event said each monadic partition is a filter character, forming a polynary partition by combining the monadic partition with at least one other monadic partition adjacent to the monadic partition, and indexing the polynary partition; and in the event that the monadic partition is not a filter character, indexing the monadic partition. Querying data comprising: receiving a data query; performing a monadic partition operation on the data query to obtain a plurality of monadic partitions; and for each monadic partition in the plurality of monadic partitions: determining whether said each monadic partition is a filter character; in the event that the monadic partition is a filter character, forming a polynary partition by combining the monadic partition with at least one monadic partition adjacent to the monadic partition, and searching a preset index using the polynary partition to obtain a search result corresponding to the polynary partition; and in the event that the monadic partition is not a filter character, searching the preset index using the monadic partition to obtain a search result corresponding to the monadic partition; and combining the search results to form a final query search result.
|