sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Ability to make all content searchable #162

Closed b-creative closed 3 years ago

b-creative commented 3 years ago

It's great to be able to add dnnsearch=true in the manifest file of the articles module. But it would be great if I can do that also with for example the HandlebarsStarter template! Or is it already possible?

Timo-Breumelhof commented 3 years ago

You can add that to any Template AFAIK

b-creative commented 3 years ago

So just add a manifest.json file?

Timo-Breumelhof commented 3 years ago

yes, with that setting

b-creative commented 3 years ago

Is there a list of settings that only work with certain templates/works with all templates?

b-creative commented 3 years ago

This is now my new manifest.json:

{ "editWitoutPostback": true, "editRole": "", "index": true, "disableEdit": false, "templates": { "template": { "type": "single", "title": "Mediablokken", "main": { "template": "template.hbs", "schemaInTemplate": true, "optionsInTemplate": true, "additionalDataInTemplate": true, "dnnsearch": true, "dnnSearchTitle": "{{Titel}}", "dnnSearchDescription": "{{Details}}", "dnnSearchText": "{{Details}}" } } } }

What do you think? I don't know for example what index:true does...

Timo-Breumelhof commented 3 years ago

Is there a list of settings that only work with certain templates/works with all templates?

OC is not built that way, in general everything works in all templates, although there can be a difference between single and multi item templates

Timo-Breumelhof commented 3 years ago

Looks good to me. index:true = for Lucene, the internal OC search engine used with jplist (example the Articles template)

b-creative commented 3 years ago

There's no menu item "Filter Settings" created though...

b-creative commented 3 years ago

Probably because it's a single-item-template? I hope the DNN search indexing works!

Timo-Breumelhof commented 3 years ago

Correct, internal Lucene indexing is only for multi item templates

b-creative commented 3 years ago

? I'm confused now. I thought Lucene indexing ís for DNN search? My question specifically concerned a single item template being searchable by DNN search module...

Timo-Breumelhof commented 3 years ago

DNN uses lucene, but OC also uses it for internal indexing to filter items server side (when requested through webapi).\ So 2 separate systems, for 2 different use cases

b-creative commented 3 years ago
  1. How can I doublecheck if it get's indexed correctly or not?
  2. DNN search results do not return the desired results. When it concerns only content of Columns (fieldtype array), do I have to put it like this?

"dnnSearchTitle": "{{Columns.Titel}}", "dnnSearchDescription": "{{Columns.Details}}", "dnnSearchText": "{{Columns.Details}}"

b-creative commented 3 years ago

Can you please reopen this issue? Single item templates do not seem to appear in DNN search results...

Timo-Breumelhof commented 3 years ago

hmm, ok I think they should be: https://opencontent.readme.io/discuss/592bd7a742c5800f00422def @sachatrauwaen ?

Timo-Breumelhof commented 3 years ago

Can you please reopen this issue? Single item templates do not seem to appear in DNN search results...

FYI, I just checked on of my single templates and it works as expected. Manifest:

{
    "editWitoutPostback": true,
    "index": true,
     "templates": {
        "template": {
            "type": "single",
            "main": {
                "template": "template.cshtml",
                "clientSideData": false,
                "dnnsearch": true,
                "dnnSearchTitle": "{{ModuleTitle}}",
                 "dnnSearchDescription": "{{Text}}",
                 "dnnSearchText": "{{Text}}"
            }
        }
    }
}
b-creative commented 3 years ago

In which version did you check? I run DNN 9.9.0 and OC 9.5.0

Timo-Breumelhof commented 3 years ago

Ok, for another project we are debugging the Search implementation (to add something) and it seems that the results I got are not from the OC module crawled by DNN Search it seems, so I think you do have a point (also in multi-item templates).. When we know more we will post here. @skamphuis @sachatrauwaen @robsiera

Timo-Breumelhof commented 3 years ago

@b-creative Looks like this is an issue for ML fields, are your the fields you are indexing ML fields?

Timo-Breumelhof commented 3 years ago

@b-creative this is what we found, please review if these are the same circumstances as yours. https://github.com/sachatrauwaen/OpenContent/issues/168

b-creative commented 3 years ago

In my case it does not concern ML fields or multi-language website. The multiple-item-template-items get indexed correctly though. Only the content using single-item-template (the basis is the HandlebarsStarter template with an added manifest.json that looks like this:

{ "editWitoutPostback": true, "Index": true, "templates": { "template": { "type": "single", "clientSide": false, "main": { "template": "template.hbs", "schemaInTemplate": true, "optionsInTemplate": true, "dnnsearch": true, "dnnSearchTitle": "{{Titel}}", "dnnSearchDescription": "{{Tekst}}", "dnnSearchText": "{{Titel}} {{Tekst}}" } } } }

Timo-Breumelhof commented 3 years ago

Did you try to delete the DNN search index files?

b-creative commented 3 years ago

Did you try to delete the DNN search index files?

no, which ones? All in \App_Data\Search?

Timo-Breumelhof commented 3 years ago

yes

b-creative commented 3 years ago

just did... first recycled the application, then removed all from the folder \App_Data\Search, did a reindex...

Same results: no single-item-template-content results

skamphuis commented 3 years ago

Other than the issue with ML field in a single language website, I didn't run into issues with dnn search.

Could you attach (or email, you got my address) your template?

skamphuis commented 3 years ago

@b-creative I tested your template with both the latest release (4.6.0) and the current develop branch (which includes #169 and #170 ) but indexing the content seems to work just fine for both versions. The result shows up in both the search dropdown and the search results page.

b-creative commented 3 years ago

Thanks! Can it be the DNN-version than? As you know/have seen, I’ve tried pretty much everything…

b-creative commented 3 years ago

Maybe a valid variable: I have also installed the OpenContent_OpenUrlRewriter

skamphuis commented 3 years ago

Thanks! Can it be the DNN-version than? As you know/have seen, I’ve tried pretty much everything…

I tried on DNN 9.9.1,

skamphuis commented 3 years ago

Maybe a valid variable: I have also installed the OpenContent_OpenUrlRewriter

I don't see how that could be relevant, sorry.