• Advanced search on Metadata gives no result

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #44476  by bsiefert
 
Hello,

I have a very basic problem in respect to search on Property Groups or Metadata.

I´ve defined a Property Group in XML, which works fine.

The property group looks like this:
Code: Select all
<property-group label="QM-Dokumente" name="okg:qmdokumente">
      <select label="Kategorie" name="okp:qmdokumente.dokkategorie" type="simple">
      		<option label="Vorgabedokument" value="Kat-Formblatt"/>
      		<option label="Nachweisdokument" value="Kat-Nachweisdokument" />
    	</select>     
  
      	<select label="Typ " name="okp:qmdokumente.doktyp" type="simple">
      		<option label="VA Verfahrensanweisung" value="VAdok"/>
      		<option label="FB Formblatt" value="FBdok" />
	        <option label="PB Prozessbeschreibung" value="PBdok"/>
      		<option label="AA Arbeitsanweisung" value="AAdok" />
            <option label="Anderes" value="sonstigedok"/>
    	</select> 

     	 <select label="Status" name="okp:qmdokumente.dokstatus" type="simple">
             <option label="Aktiv- Dokument verwenden/abgeschlossen " value="Dokument-aktiv"/>
             <option label="Inaktiv - Dokument nicht verwenden/nicht abgeschlossen " value="Dokument-inaktiv" />
    	</select> 
      <select label="Bearbeitungsstatus" name="okp:qmdokumente.dokbearb" type="simple">
      		<option label="in Entwicklung" value="dokbearb1"/>
      		<option label="in Überarbeitung" value="dokbearb2" />
	        <option label="in Freigabeprozess" value="dokbearb3"/>
      		<option label="Freigegeben" value="dokbearb4" />
          <option label="in Prüfung durch Extern" value="dokbearb5" />
          <option label="Zurückgezogen" value="dokbearb6" />
          <option label="Ersetzt durch anderes Dokument" value="dokbearb7" />
            <option label="Unbekannt" value="dokbearb8"/>
    	</select> 

      <input label="ab Datum gültig/ungültig" type="date" name="okp:qmdokumente.dokdate1" />   
    <textarea label="Kommentar" name="okp:qmdokumente.comment"/>
  </property-group>  
When trying to search through advaced Search->Metadata-> Select Property Group-> Select Property

I can click on search ,but no results are displayed ( I know there should be results)

Except when searchin on the comment, which gives the following result in the attached screenshot.

Did I miss something inthe property Group definition? I expected advanced search on metadata ould give back documents wity any and any combination of Properties searched for.

Regards

Bernhard
Attachments
screenshot of successful search
screenshot of successful search
screenshot_165.png (39.69 KiB) Viewed 1562 times
 #44485  by bsiefert
 
While playing around with the metadata syntax, I could get to a working solution to make metadata search work.

It seemss ( community 6.3.1) that It is required to give the ending of "name" the same string as the "label'
Example
label= "Dokumententyp" name="okp:<whatever>.dokumententyp"

furthermore "-" is a invalid character vor "value" , RTFM

==== working metadata definition=====================================
Code: Select all
<property-group label="QM-Dokumente" name="okg:qmdokumente">
      <select label="Kategorie" name="okp:qmdokumente.kategorie" type="simple"> <<<== name ends on same string as label
      		<option label="Vorgabedokument" value="Vorgabedokument"/>
      		<option label="Nachweisdokument" value="Nachweisdokument" />
    	</select>      
      	<select label="Dokumententyp " name="okp:qmdokumente.dokumententyp" type="simple"> <<<== name ends on same string as label
      		<option label="VA Verfahrensanweisung" value="VAdok"/>
      		<option label="FB Formblatt" value="FBdok" />
	        <option label="PB Prozessbeschreibung" value="PBdok"/>
      		<option label="AA Arbeitsanweisung" value="AAdok" />
            <option label="Anderes" value="sonstigedok"/>
    	</select> 
     	<select label="Dokumentenstatus" name="okp:qmdokumente.dokumentenstatus" type="simple">            <<<== name ends on same string as label
             <option label="Aktiv- Dokument verwenden/abgeschlossen " value="Dokumentaktiv"/>                          <<<== removed "-"
             <option label="Inaktiv - Dokument nicht verwenden/nicht abgeschlossen " value="Dokumentinaktiv" />  <<<== removed "-"
    	</select> 
      	<select label="Bearbeitungsstatus" name="okp:qmdokumente.bearbeitungsstatus" type="simple"> <<<== name ends on same string as label
      		<option label="in Entwicklung" value="dokbearb1"/>
      		<option label="in Überarbeitung" value="dokbearb2" />
	        <option label="in Freigabeprozess" value="dokbearb3"/>
      		<option label="Freigegeben" value="dokbearb4" />
          	<option label="in Prüfung durch Extern" value="dokbearb5" />
          	<option label="Zurückgezogen" value="dokbearb6" />
          	<option label="Ersetzt durch anderes Dokument" value="dokbearb7" />
          	<option label="Unbekannt" value="dokbearb8"/>
    	</select> 
      <input label="ab Datum gültig/ungültig" type="date" name="okp:qmdokumente.date" />   
    <textarea label="Kommentar" name="okp:qmdokumente.comment"/>
  </property-group>
 #44495  by jllort
 
Take in mind value is the content what will be used by search engine ( lucene ) and the contents when going across lucene might be tokenized. That's why is not good idea into the value add white spaces or other characters like "-", I think this might be the reason of the issue.
I encourage also to upgrade to version 6.3.4, might be in older version there's some bug with it.

About your property group definition:
Code: Select all
<property-group label="QM-Dokumente" name="okg:qmdokumente">
<select label="Kategorie" name="okp:qmdokumente.dokkategorie" type="simple">
<option label="Vorgabedokument" value="Kat-Formblatt"/>
<option label="Nachweisdokument" value="Kat-Nachweisdokument" />
</select> 
For example I suggest to change with:
Code: Select all
<property-group label="QM-Dokumente" name="okg:qmdokumente">
<select label="Kategorie" name="okp:qmdokumente.dokkategorie" type="simple">
<option label="Vorgabedokument" value="001"/>
<option label="Nachweisdokument" value="002" />
</select> 
or
Code: Select all
<property-group label="QM-Dokumente" name="okg:qmdokumente">
<select label="Kategorie" name="okp:qmdokumente.dokkategorie" type="simple">
<option label="Vorgabedokument" value="katformblatt"/>
<option label="Nachweisdokument" value="katnachweisdokument" />
</select> 
Finally, consider values like primary keywords into database. Think that these terms going across a search engine what sometimes does something with this values ( for it are terms ), that's why for example I used values 001 rather simply 1. Why ? imagine you have value 11 and 1, when you looking for term 1 the results might be 1 and 11 what also migh acomplish with the query, in the other hand adding 00 in the front of 1, I'm totally sure, when looking for 001 value I will not get any conflict with other term what constains the subchain. Hope I explained clearly.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.