<mf-search-results></mf-search-results>
Search result display element Example of use
Applicable attributes
lang (String)
Specify the display language with attribute lang.
Example of useajax-url (String)
ajax Search URL:pager-item-count (Number)
Set the maximum number of items to be displayed in pager module
Exampledisable-pagelog (Boolean)
Disable page logpager-pagenum-blank (Boolean)
Output
instead of page number with pagerdisable-resultframe (Boolean)
Disable results framedisable-multi-viewer (Boolean)
Disable the PDF viewer (including doc, xls, ppt)result-callback (String)
Callback function name when retrieval result is received
Executed withwindow["<result-callback>"]()
, must defined separately:on-result-func (Function:
window.<function name>
etc.)
Callback function when receiving search results
It is necessary to predefine a function at the location that js can reach from the window object
It does not work if the attributeresult-callback
is set correctly.hide-header (Boolean)
Do not display the header (title & search result summary) part
Example of usehide-pager (Boolean)
Hide pager element
Example of useuse-related-keywords (Boolean)
Display related keywords element under search results
Example of usetarget-self (Boolean)
Transit to search result page in the same window
Example of use:title-frags-func (Function:
window.<function name>
, etc.)
Function to return a string fragment for customizing the title string
It is necessary to predefine a function at the location that js can reach from the window object
Function specification to be set: function(OrganicDoc) => Array of HighlightInfo
Setting example → When you want to make pdf title a file name:snippet-frags-func (Function:
window.<function name>
, etc.)
Function to return a string fragment to customize snippet string
It is necessary to predefine a function at the location that js can reach from the window object
Function specification to be set: function(OrganicDoc) => Array of HighlightInfo:uri-frags-func (Function:
window.<function name>
, etc.)
Function to return a string fragment to customize uri string
It is necessary to predefine a function at the location that js can reach from the window object
Function specification to be set: function(OrganicDoc) => Array of HighlightInfo
Setting Example
If you want to make the title of pdf a file name
Define the js function on the search result page.
<script>
window.my_title = function(doc,i){
if (doc.attrs.type == 'application/pdf' || doc.attrs.type == 'pdf') {
var m = doc.uri.match(/([^#]*)(#.*)?/);
var t = m[1].replace(/.*\/([^/]+\/?)/, '$1') + (m[2]||'');
return [{id:0, text:t, type:'custom'}];
}
}
</script>
Specify the function above with the “:title-frags-func” attribute of the custom element
DOM structure and class settings
- div.mf_finder_organic_wrapper
.mf_available_resultframe Class to be set if a result frame is available
.mf_finder_organic_zerohit Class to be set when 0 search result
.mf_imgsize_<imgsize>
The class is set according to the imgsize parameter (0, 1, 2, 3) of the search request- div.mf_finder_organic
- div.mf_finder_msk_wrapper > div.mf_finder_msk > span.mf_finder_msk_item > a > [Similar words]
:The display language around similar words can be specified with attributelang
Example of use - No display when mf-search-results-header reference attribute
hide-header
is specified - (Use Slot “docs” to customize the following)
- div.mf_finder_organic_docs_wrapper > di.mf_finder_organic_docs
- (plural) (Use slot “doc” ) and you can customize the following
- section.mf_finder_organic_doc: Document information
- div.mf_finder_organic_doc_img_wrapper.mf_gui_img_frame
- a.mf_finder_organic_doc_img.mf_finder_link
- (Use Slot “doc_image” and you can customize the following)
- img: Capture image
- a.mf_finder_organic_doc_zoom > Text “Zoom”
- (Use Slot “doc_image” and you can customize the following)
- div.mf_finder_organic_doc_contents_wrapper > div.mf_finder_organic_doc_contents
- (Use Slot “doc_head” you can customize the following)
- a.mf_finder_organic_doc_title_wrapper.mf_finder_link
- ( Slot “doc_title_prev” can insert content)
- (Use Slot “doc_title” you can customize the following)
- img: Line head icon (empty if none)
- span.mf_finder_organic_doc_title
- span (plural)
.mf_finder_frag_<n> Class to be set according to fragment type
.mf_finder_mark Class to be set for fragments matching search terms- [text fragment of title]
- span (plural)
- ( Slot “doc_title_post” can insert content)
- a.mf_finder_organic_doc_title_wrapper.mf_finder_link
- ( Slot “doc_body_prev” can insert content)
- div.mf_finder_organic_doc_body_wrapper
- (Use Slot “doc_body” and you can customize the following)
- div.mf_finder_organic_doc_body
- span (plural)
.mf_finder_frag_<n> Class to be set according to fragment type
.mf_finder_mark Class to be set for fragments matching search terms- [Text fragment of snippet]
- span (plural)
- div.mf_finder_organic_doc_body
- (Use Slot “doc_body” and you can customize the following)
- ( Slot “doc_body_post” can insert content)
- a.mf_finder_organic_doc_url_wrapper.mf_finder_link
- ( Slot “doc_url_prev” can insert content)
- (Use Slot “doc_url” and you can customize the following)
- span.mf_finder_organic_doc_url
- span (plural)
.mf_finder_frag_<n> Class to be set according to fragment type
.mf_finder_mark Class to be set for fragments matching search terms- [text fragment of document URL]
- span (plural)
- span.mf_finder_organic_doc_url
- ( Slot ‘doc_url_post’ can insert content)
- ( Slot “doc_foot” content insertable)
- (Use Slot “doc_head” you can customize the following)
- a.mf_finder_organic_doc_img.mf_finder_link
- (plural) (Use slot “doc” ) and you can customize the following
- To be displayed only when attribute
use-related-keywords
is specifed (refer to mf-related-keywords) - No display when attribute
hide-pager
is specified (refer to mf-search-results-pager) - div.mf_finder_logo
- a > text “marsflag”
- div.mf_finder_organic_docs_wrapper > di.mf_finder_organic_docs
- div.mf_finder_msk_wrapper > div.mf_finder_msk > span.mf_finder_msk_item > a > [Similar words]
- div.mf_finder_organic
Slot for DOM customization
For the slots, see the description below
Slot name header
Properties that can be referenced
- organic : organic of search result object
- params : params of search result objects
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name docs
Properties that can be referenced
- organic: organic of search result object
- docs : organic.docs of search result opjects
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc
Properties that can be referenced
- doc : OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_image
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_head
Properties that can be referenced
- doc : OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_title_prev
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_title
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by
Slot name doc_title_post
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_body_prev
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_body
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by
Slot name doc_body_post
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_url_prev
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_url
Properties that can be referenced
- doc: OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by
Slot name doc_url_post
Properties that can be referenced
- doc : OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func
Slot name doc_foot
Properties that can be referenced
- doc : OrganicDoc
- i : Index(0,1,2,…)
- self : instance of current custom element
- customProp : data returned by the function specified by attribute
:custom-prop-func