Skip to content

Search metadata #1080

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",
										}}
									/>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfrontendFrontend specific (react)

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions