views:

22

answers:

0

Some databases (e.g. Scopus and Web of Science) implement proximity operators such as SAME or NEAR. With these the user can define that he wants his search words to be within a set number of words from each other or in the same sentence or paragraph.

I just started wondering how this is implemented. Full-text search as is is not that complex but how is the indexing done to make proximity searches feasible. The databases I have tried have hundreds of thousands of articles so obviously they have been indexed, but if you try to use the same tactic as with normal full-text search (as I understand they have been implemented) the size of the index would be impractically large.

So, how is this done?