Facing problem in searching on item metadata and configuring entities in Dspace 7

45 views
Skip to first unread message

Mohit Jain

unread,
Jun 22, 2020, 10:57:00 AM6/22/20
to DSpace Community
I am new to Dspace and I am following given document for configuring entities in Dspace 7

I have changed relationship-types.xml at following path /dspace/backend/dspace/config/entities and tried to process this XML into database using scripts given on page 5 of above document. i.e
[install_dir]/bin/dspace dsrun org.dspace.app.util.InitializeEntities -f
[install_dir]/config/relationship-types.xml

Also the path given in document seems wrong.

My second problem is searching item using custom metadata.
I have used Rest API to successfully create metadata schema, metadata fields and the same is also there in respective database tables. And when I create an item with these metadata fields, the item is also created successfully but I am facing 2 problems with this.
1. The name of item becomes null
2. I am not able to search an Item using its metadata.

Following is the script I used to create an Item
{
"name": "42172016",
"metadata": {
{
"value": "ABCD",
"language": "en",
"authority": null,
"confidence": -1
}
],
{
"value": "XYZ",
"language": "en",
"authority": null,
"confidence": -1
}
],
"sci.regNo": [
{
"value": "42172016",
"language": "en",
"authority": null,
"confidence": -1
}
]
},
"inArchive": true,
"discoverable": true,
"withdrawn": false,
"type": "item"
}


when I search using rest api /api/discover/search/objects?query=42172016&dsoType=ITEM I get the following result

{
"id": null,
"scope": null,
"query": "42172016",
"appliedFilters": null,
"sort": null,
"configuration": null,
"type": "discover",
"_links": {
"self": {
"href": "http://<>/server/api/discover/search/objects?query=42172016&dsoType=ITEM"
}
},
"_embedded": {
"searchResult": {
"_embedded": {
"objects": []
},
"page": {
"number": 0,
"size": 20,
"totalPages": 0,
"totalElements": 0
},
"_links": {
"self": {
"href": "http://<>/server/api/discover/search/objects?query=42172016&dsoType=ITEM"
}
}
},
"facets": [
{
"name": "author",
"facetType": "text",
"facetLimit": 5,
"_links": {
"self": {
"href": "http://<>/server/api/discover/facets/author?query=42172016&dsoType=ITEM"
}
},
"_embedded": {
"values": []
}
},
{
"name": "subject",
"facetType": "hierarchical",
"facetLimit": 5,
"_links": {
"self": {
"href": "http://<>/server/api/discover/facets/subject?query=42172016&dsoType=ITEM"
}
},
"_embedded": {
"values": []
}
},
{
"name": "dateIssued",
"facetType": "date",
"facetLimit": 5,
"_links": {
"self": {
"href": "http://<>/server/api/discover/facets/dateIssued?query=42172016&dsoType=ITEM"
}
},
"_embedded": {
"values": []
}
},
{
"name": "has_content_in_original_bundle",
"facetType": "standard",
"facetLimit": 2,
"_links": {
"self": {
"href": "http://<>/server/api/discover/facets/has_content_in_original_bundle?query=42172016&dsoType=ITEM"
}
},
"_embedded": {
"values": []
}
},
{
"name": "entityType",
"facetType": "text",
"facetLimit": 5,
"_links": {
"self": {
"href": "http://<>/server/api/discover/facets/entityType?query=42172016&dsoType=ITEM"
}
},
"_embedded": {
"values": []
}
}
]
}
}



Reply all
Reply to author
Forward
0 new messages