A ready-made ef core data search solution
Hi, I need to do a database content search engine. I would like the search engine to look for a word not a sentence. There is something ready? Currently I have contains but it searches for the entire string. I'd like to do it on a word board basis
![](https://utfs.io/f/d95f7c94-f4de-4f39-a572-e681f89bc34c-4pl4mu.png)
37 Replies
my example code:
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Did I do something wrong?
![](https://utfs.io/f/af8572f5-dbe6-423b-8a58-c44e7a517947-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok thank you for help 😄
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I have a problem with Join:
Error CS0411 Unable to infer the type arguments for the method 'Queryable.Join <TOuter, TInner, TKey, TResult> (IQueryable <TOuter>, IEnumerable <TInner>, Expression <Func <TOuter, TKey >>, Expression <Func <TInner, TKey >>, Expression <Func <TOuter, TInner, TResult >>) ”based on usage. Try to explicitly specify type arguments.
![](https://utfs.io/f/f8759396-6be8-476a-9174-53c1580c3542-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
![](https://utfs.io/f/c84fceee-0f18-44e1-a1ad-f8ae6c0a8e1c-4pl4mu.png)
IQueryable<Models.Article>
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
copilot 😄
Error CS1061 "IQueryable <Article>" does not contain a definition of "Join" and an available extension method "Join" that takes the first argument of type "IQueryable <Article>" was not found (are you missing a using directive or an assembly reference?).
![](https://utfs.io/f/2898f1a5-cf4b-448b-bff9-d823c9464d89-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
CS0305 Use generic element method "Queryable.Join <TOuter, TInner, TKey, TResult> (IQueryable <TOuter>, IEnumerable <TInner>, Expression <Func <TOuter, TKey >>, Expression <Func <TInner, TKey >>, Expression <Func <TOuter, TInner, TResult >>) "requires arguments of type" 4 "
This is the bug, I've seen a similar solution somewhere on stackoverflow before but can't find it.
![](https://utfs.io/f/81c34b36-f578-41e6-b006-da3ec713bf8b-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes, I have no idea what this is about
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Thanks for your help, I'll have a look. I am also looking to see if Linq can do it.
Error CS1937 The name "term" is outside the range of the left side of the equality operator. Consider swapping expressions on both sides of the equality operator.
![](https://utfs.io/f/e566b6e4-bee3-4316-b03d-58798eebc37c-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
string
![](https://utfs.io/f/5972e7b8-8269-4f52-b7cd-06cb2a8645a0-4pl4mu.png)
hmm
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
https://github.com/ninjanye/SearchExtensions I found a library here but it doesn't seem to be updated.
GitHub
GitHub - ninjanye/SearchExtensions: Library of IQueryable extension...
Library of IQueryable extension methods to perform searching - GitHub - ninjanye/SearchExtensions: Library of IQueryable extension methods to perform searching
yes, x.Details.Content and Title string
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'm surprised that ef core doesn't support this by default.
what is "o"?
![](https://utfs.io/f/d6555ea2-ba6b-431a-8090-feeb6d3049e7-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I think it works, thank you so much for your help.
I think I will have to think about elastic search and look for results there 😄
Ready code as if someone was looking.
![](https://utfs.io/f/c6d3a715-81a1-4fa5-934a-5440984c925c-4pl4mu.png)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
if you call AsAsyncEnumerable you will load that on memory whilel it is selecting
Will there be a performance issue?
maybe copare suing the AsAsync Enumerable below the where
above the first select
also why not select the article before hand...
so you dont have to query twice the article