Forum


HomeHomePremiumPremiumDevelopmentDevelopmentLucene SearchLucene Search
Previous
 
Next
New Post
2/13/2018 11:16 AM
 
Hi Scoot,

Good evening, I would like to clear my self. Please correct me if I am wrong. Right now , I have google site search. 

Instead of google , I want to do lucene serach. I want to put one search button and textbox. When user type anything , it will display resutl from whole site not only particular moudule.

This will be only searchcontent module. No any other api or content. 

I  follow from your below vedio.


https://www.dnnhero.com/Premium/Tutorial/ArticleID/307/Search-Integration-Implement-SearchModuleBase-Part-3-4

https://www.dnnhero.com/Premium/Tutorial/ArticleID/308/Search-Integration-Packaging-and-Testing-our-code-Part-4-4

In above vedio , you just used future controller and below method in Future controller. I do not see "Search API"

As per your previou reply, Search API will use for custome module serach.


GetModifiedSearchDocuments
CreateUniqueKeyFromItemId
GetItemIdFromUniqueKey
ConvertItemToSearchDoc
ConvertSearchDocToItem(SearchResult result)

i look forward to hearing from you

Thank you!
        

 
New Post
2/14/2018 10:59 AM
 
Hi Aderson/Scott,

Good afternoon, Thank you! I would like to request. Please remove my all post. Finally, I did figure out. I am following below link 


My reqquriment. Site serach. Searchbox should be on header of each module . If user type anything , the result should display on screen.

1. I took Chris MVC template.

2. I added future controller code per scott vedio -serach content code

3. Attached is my dnn manfiest file.

I can debug. I am not getting data. I did reindex. Delete files from app.data /serach folder. 



Attached is screen sort.

Did my business controller name is correct ?

I see serachable is on in DNN . 

Please advise.

Thanks!
 
New Post
2/21/2018 4:23 AM
 

Hi, 

I have been working on lucene search. I followed each step from Scott vedio however result is nothing. 
Does   scott lucene vedio would work in Dnn 9.1


 I see the two by default modules in DNN 9.1. \DesktopModules\Admin\SearchResults
\DesktopModules\Admin\SearchInput  
How do these module work?


Do we need to creat custome module for lucene search in DNN 9 or just select site setting=search- Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net

Please let me know .

Thank you!
 
New Post
3/5/2018 3:44 AM
 

Ami,

There are two parts to implementing search using DNN (and lucene).  #1 - Indexing data (adding or updating data in the lucene index) and  #2 - Querying the data (searching the index).

My tutorial that explains the ModuleSearchBase implementation is for the purpose of  #1.  The GetModifiedSearchDocuments() implementation (in DotNetNuclear.SearchContent.zip) is called when DNN's Site Crawler scheduled task runs to ask all DNN modules for their search index data.  My tutorial shows how you can push custom module data into the DNN lucene index.  This has nothing to do with querying the lucene index.

 

My other tutorial for customizing the search results (DotNetNuclear_HandlebarsCustomResults.zip) shows #2, querying the index.  It is true I don't show the C# code for performing a lucene search.  Instead I call the core webAPI method from DNN that queries the index.  This is a javascript method in the results.ascx:


function runSearch(term, filter) {
var apiUrl = dnnSearchAPI.getServiceRoot('internalservices') + "searchService/search";
if (filter) { term += ':' + filter; }
apiUrl += '?search=' + encodeURIComponent(term) + '&pageIndex=1&pageSize=15&sortOption=0&culture=en-US'
$.get(apiUrl, function( data ) {
//use the search result data
});
}

Above you can see I am using the DNN's internalServices/searchService/search webapi method.   You can look at how DNN performs the lucene search in this webAPI method.  https://github.com/dnnsoftware/Dnn.Pl...

 

If you are just trying to implement a custom search input box that should be on every page, I would build it as a Theme/Skin Object.  I have a tutorial that explains how to build a custom skin object. This would allow your search box to be embedded into the site's skin so you don't need to put a module on all pages.

 

To answer your question about the core search input.  That is a skin object.  The code is in /admin/Skins/search.ascx.  You can start by copying this for your custom skin object.

Hopefully this helps with confusion.  I will try to check on this post more often so I can answer your questions sooner.

 

 

 

 

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentLucene SearchLucene Search



Try FREE
30 days money back guaranteed