c# - RavenDB. Alternative to leading wildcard? -


i have ravendb collection approximately 1 million documents. 1 field in these documents string containing domain name. have business requirement let users search substring of domain. example search 'example' needs return documents domain field contains example.com, example.net, or www.example.com.

another standard search domain extension such .com return .com domains.

it not safe assume period delimits search term.

i'm moving ms sql environment , trying wrap head around doing without leading wildcard support. realize raven can use leading wildcards such searches expensive , slow. i've considered reversed version of field won't meet requirement.

is ngram analyzer answer? how can meet search requirements?

in order support arbitrary subsequences tokens, yes, ngram analyzer right approach.

the example you've provided, though, should not require it. indexing "www.example.com" should produce searchable token "example" (the standard analyzer will, instance), no wildcards necessary @ in example.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -