Proximity search - Full Text Index Search
-
Hi I have several PDF document uploaded to database SQL Server 2005. I want to see how many PDF document contains word "technology" and "agreement" within a maximum of 5 word difference. "Near" clause in CONTAIN finction provides a way to get all document where I can get "technology" and "agreement" is nearby. But restrcting proximity within 5 word is the main problem. Following is my query that fetches all DocIDs where word "Technology" is followed by "Agreement" (Does not restrict Agreement word follows within 5 word of "Technology") SELECT count(DocID) FROM tblDoc WHERE CONTAINS(DocContent, 'Technology NEAR Agreement'); GO I want to get those DocID, which is having "technology" and "Agreement" within 5 words. Any help is appreciated. Thanks in advance
Thanks, Arindam D Tewary