-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,597 additions
and
37 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,441 changes: 1,441 additions & 0 deletions
1,441
Umbraco.Examine.Linq.Sandbox/Umbraco.Examine.Linq.Sandbox.csproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+136 KB
Umbraco.Examine.Linq.Sandbox/media/created-packages/LinqToExamine_1.2.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Examine; | ||
using Examine.LuceneEngine.Providers; | ||
using Examine.SearchCriteria; | ||
|
||
namespace Umbraco.Examine.Linq.SearchProviders | ||
{ | ||
public class LuceneSearch : ISearcher | ||
{ | ||
protected string IndexName { get; set; } | ||
|
||
public static Dictionary<string, ISearchCriteria> searchQueryCache { get; set; } | ||
|
||
static LuceneSearch() | ||
{ | ||
searchQueryCache = new Dictionary<string, ISearchCriteria>(); | ||
} | ||
|
||
public LuceneSearch(string indexName) | ||
{ | ||
IndexName = indexName; | ||
} | ||
|
||
public IEnumerable<SearchResult> Search(string query) | ||
{ | ||
LuceneSearcher searcher = ExamineManager.Instance.SearchProviderCollection[IndexName] as LuceneSearcher; | ||
return searcher.Search(searcher.CreateSearchCriteria().RawQuery(query)).ToList(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters