I am new to Dspace and I am following given document for configuring 
entities in Dspace 7
https://docs.google.com/document/d/1X0XsppZYOtPtbmq7yXwmu7FbMAfLxxOCONbw0_rl7jY/edit#heading=h.lksvg0ayjx6r

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": {
"sci.resp.name": [
{
"value": "ABCD",
"language": "en",
"authority": null,
"confidence": -1
}
],
"sci.pet.name": [
{
"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": []
}
}
]
}
}



-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-community/71c2d5f8-6ff4-4aa8-901c-c666c22f844ao%40googlegroups.com.

Reply via email to