Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fields and a broken link #271

Open
wilsonchenbhs opened this issue Mar 10, 2022 · 1 comment
Open

Multiple fields and a broken link #271

wilsonchenbhs opened this issue Mar 10, 2022 · 1 comment
Labels

Comments

@wilsonchenbhs
Copy link

On page https://shazwazza.github.io/Examine/searching , we can search by specific field:

_var searcher = myIndex.GetSearcher(); // Get a searcher
 var results = searcher.CreateQuery() // Create a query
 .Field("Address", "Hills") // Look for any "Hills" addresses
 .Execute(); // Execute the search

But, can we use multiple fields? Like:

_var searcher = myIndex.GetSearcher(); // Get a searcher
 var results = searcher.CreateQuery() // Create a query
 .Field("Name", "Frank") // Look for any "Frank" names
 .Field("Address", "Hills") // Look for any "Hills" addresses
 .Execute(); // Execute the search

BTW: the link on that page to https://github.com/Shazwazza/Examine/blob/master/src/Examine.Test/Search/FluentApiTests.cs is broken.

@Shazwazza
Copy link
Owner

Yes you can definitely search on multiple fields.

The FluentApiTests are here https://github.com/Shazwazza/Examine/blob/dev/src/Examine.Test/Examine.Lucene/Search/FluentApiTests.cs

There are tons of different searching examples there.

The docs could definitely use some more love and would be great if you or anyone could help contribute to them. They are very easy to edit, can even be done directly on GitHub by editing the files, for example, this is the searching file: https://github.com/Shazwazza/Examine/blob/master/docs/searching.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants