I have a table with a lot of data. One field is a string for example
searchableField
row 1: abcdefgdefg1hijklmnopqrstuvw234234
row 2: abcdefgdefg1hijklmnopqrstuvw2dsfds33
I only want result row 5 back, but adding search therm defg2 won't work. In some other cases I want onl y result 1, 2, 3, 4, 6 back. but also searching on defg1 won't work for me.
Something that should work for me is a filter, but unfortunately there are no filters with contains. What can I do as work around?
Please read the How full text search works in Azure Search article. It will help you understand how your documents and query terms are processed and how to customize the behavior of your search index to achieve the results you want.
In your case, you might want to create a custom analyzer that will break up the long terms in your document into smaller ones that are likely to be used as query terms by users of your application.
Alternatively, you can issue a wildcard or a regex query using the Lucene query language to simulate the contains behavior you're looking for. More information here: Azure search, search by partial terms