You can configure the IDOL Content component to display specific document fields whenever it returns query results. Alternatively, you can specify the document fields that Content returns when you perform an individual query.
To display specific document fields every time Content returns query results, create a field process in the IDOL Content component configuration file that identifies the document fields that you want to display. After you create this field process, the fields that you identified always display when Content returns query results (provided that you set the query action Print
parameter to Fields
, which is its default value).
Open the IDOL Content component configuration file in a text editor.
In the [FieldProcessing]
section, list a new field process whose name indicates that the process identifies which fields are displayed.
For example:
[FieldProcessing] 0=MyFirstProcess 1=PrintFields
Create a section for the new field process that you listed, in which you create a property for the process (you define the property later by setting one or more applicable configuration parameters). Use the PropertyFieldCSVs
parameter to identify the fields that you want to display.
NOTE: The property that you create must not have the same name as the process.
For example:
[PrintFields] Property=Print PropertyFieldCSVs=*/SUMMARY,*/DRECONTENT
Create a section for the property in which you set the PrintType
parameter to True
. This displays the associated PropertyFieldCSVs
fields for query results. For example:
[Print] PrintType=True
Save and close the configuration file.
Restart the IDOL Content component for your changes to take effect.
Every time you perform a Query
, Suggest
, SuggestOnText
, or GetContent
query, IDOL Server now returns SUMMARY
and DRECONTENT
field of the result documents, in addition to the metafields that it displays by default.
To return specific document fields for individual queries, use the Print
or PrintFields
action parameters when you perform a Query
, Suggest
, SuggestOnText
, or GetContent
query action.
Print
. Use one of the following options to determine the types of fields to display:
All
|
All XML fields. NOTE: This option does not display temporary fields that you create in a |
AllSections
|
All fields, and all sections in section breaking fields. |
Date
|
Fields with the DateType property. |
Fields
|
Fields with the |
Index
|
Fields with the |
IndexText
|
The contents of fields with the |
NegativeFields
|
All fields, except those listed in the |
None
|
The first reference field only. |
NoResults
|
No results or fields. The query returns only the number of hits. |
Parametric
|
Fields with the ParametricType property. |
Reference
|
Fields with the ReferenceType property. |
Source
|
Fields with the |
For example:
http://12.3.4.56:4000/action=Query&Text=Hogwarts school of witchcraft and wizardry&Print=Index
This query returns results that are conceptually similar to the specified query text. Each result returns with fields that were set up as Index
fields in the IDOL Content component configuration file.
PrintFields
. A list of fields that you want to display in the results.
If you also set Print
, Print
generally takes precedence. However:
when you set Print
to Fields
, only the specified PrintFields
are displayed.
when you set Print
to NegativeFields
, the specified PrintFields
are not displayed.
For example:
http://12.3.4.56:4000/action=Query&Text=Hogwarts school of witchcraft and wizardry&PrintFields=Author,Title
This query returns results that are conceptually similar to the specifid query text. Each result returns with its Author
and Title
fields.