How to handle synonyms and stopwords from file?

Hi,

I need to implement Synonym search and Stop words search in my application. I maintaining separate files for both and doing indexing. But Stop word search is not working. In Synonym search I'm able to fetch the records but this causing an issue, whenever I ran the query I'm getting different search results for the same record.

Can someone help me in fixing this issue. It is a bit urgent.

Thanks,
@vaniaravinda