Skip to content

Search metadata #1080

@longshuicy

Description

@longshuicy

Right now metadata is indexed with File and Dataset in ES.

# Add en entry to the file index
    doc = ElasticsearchEntry(
        resource_type="file",
        name=file.name,
        creator=file.creator.email,
        created=file.created,
        downloads=file.downloads,
        user_ids=authorized_user_ids,
        content_type=file.content_type.content_type,
        content_type_main=file.content_type.main_type,
        dataset_id=str(file.dataset_id),
        folder_id=str(file.folder_id),
        bytes=file.bytes,
        metadata=metadata,
        status=file.status,
    ).dict()

But missing ways to search them

<DataSearch
										title="Search for Datasets and Files"
										placeholder="Type in any keyword that you wish to search..."
										componentId="searchbox"
										autosuggest={true}
										highlight={true}
										queryFormat="and"
										fuzziness={0}
										debounce={100}
										react={{
											and: [
												"creatorfilter",
												"downloadfilter",
												"fromfilter",
												"tofilter",
											],
										}}
										// apply react to the filter
										URLParams={true}
										showFilter={true}
										showClear={true}
										renderNoSuggestion="No suggestions found."
										dataField={["name", "description", "creator.keyword"]}
										fieldWeights={[3, 2, 1]}
										innerClass={{
											title: "search-title",
											input: "search-input",
										}}
									/>

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfrontendFrontend specific (react)

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions