Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the host that is used for entities in WDQS? Default is wikibase.svc, I want it to be localhost #385

Open
rodrigomorales1 opened this issue Nov 23, 2022 · 1 comment

Comments

@rodrigomorales1
Copy link

The context

I'm running Wikibase locally for experimentation purposes. In this section, I describe the installation process that I followed for getting it running.

I downloaded the files in the example directory from the main branch as of the time of this writing (permalink to commit). I didn't made a single modification to these files.

I then ran the docker-compose command as shown below.

$ docker-compose -f docker-compose.yml -f docker-compose.extra.yml up -d
WARN[0000] The "OAUTH_CONSUMER_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OAUTH_CONSUMER_SECRET" variable is not set. Defaulting to a blank string. 
[+] Running 15/15
 ⠿ Network wikibase-docker_default                 Created  0.0s
 ⠿ Volume "wikibase-docker_query-service-data"     Created  0.0s
 ⠿ Volume "wikibase-docker_shared"                 Created  0.0s
 ⠿ Volume "wikibase-docker_elasticsearch-data"     Created  0.0s
 ⠿ Volume "wikibase-docker_mediawiki-mysql-data"   Created  0.0s
 ⠿ Volume "wikibase-docker_quickstatements-data"   Created  0.0s
 ⠿ Container wikibase-docker-mysql-1               Started  4.4s
 ⠿ Container wikibase-docker-wdqs-1                Started  4.1s
 ⠿ Container wikibase-docker-elasticsearch-1       Started  4.3s
 ⠿ Container wikibase-docker-wikibase_jobrunner-1  Started  5.0s
 ⠿ Container wikibase-docker-wikibase-1            Started  5.0s
 ⠿ Container wikibase-docker-wdqs-proxy-1          Started  4.6s
 ⠿ Container wikibase-docker-wdqs-frontend-1       Started  5.0s
 ⠿ Container wikibase-docker-wdqs-updater-1        Started  2.1s
 ⠿ Container wikibase-docker-quickstatements-1     Started  2.1s

At this point, I could

image

$ curl \
  -G 'http://localhost:8834/proxy/wdqs/bigdata/namespace/wdq/sparql' \
  -H 'Accept: text/csv' \
  --data-urlencode query='
SELECT ?a ?b ?c {
  ?a ?b ?c.
}'
a,b,c
http://wikibase.svc,http://schema.org/dateModified,2022-11-23T05:12:48Z
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#claim,http://wikibase.svc/prop/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#directClaim,http://wikibase.svc/prop/direct/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#novalue,http://wikibase.svc/prop/novalue/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#propertyType,http://wikiba.se/ontology#WikibaseItem
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#qualifier,http://wikibase.svc/prop/qualifier/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#qualifierValue,http://wikibase.svc/prop/qualifier/value/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#reference,http://wikibase.svc/prop/reference/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#referenceValue,http://wikibase.svc/prop/reference/value/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#statementProperty,http://wikibase.svc/prop/statement/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#statementValue,http://wikibase.svc/prop/statement/value/P1
http://wikibase.svc/entity/P1,http://schema.org/version,3
http://wikibase.svc/entity/P1,http://schema.org/dateModified,2022-11-23T05:12:49Z
http://wikibase.svc/entity/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://wikiba.se/ontology#Property
http://wikibase.svc/entity/P1,http://www.w3.org/2000/01/rdf-schema#label,My property 1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#statements,0
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#timestamp,2022-11-23T05:12:52Z
http://wikibase.svc/entity/Q1,http://schema.org/version,2
http://wikibase.svc/entity/Q1,http://schema.org/dateModified,2022-11-23T05:12:42Z
http://wikibase.svc/entity/Q1,http://www.w3.org/2000/01/rdf-schema#label,My item 1
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#statements,0
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#sitelinks,0
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#identifiers,0
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#timestamp,2022-11-23T05:12:52Z
http://wikibase.svc/prop/direct/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/statement/value/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/statement/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/qualifier/value/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/qualifier/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/reference/value/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/reference/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/novalue/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#Class
http://wikibase.svc/prop/novalue/P1,http://www.w3.org/2002/07/owl#complementOf,_:t17
http://wikibase.svc/prop/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
_:t17,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#Restriction
_:t17,http://www.w3.org/2002/07/owl#onProperty,http://wikibase.svc/prop/direct/P1
_:t17,http://www.w3.org/2002/07/owl#someValuesFrom,http://www.w3.org/2002/07/owl#Thing

The problem

As you can see in the screenshot below, the URLs for the entities use wikibase.svc instead of localhost.

image

When I click in the link http://wikibase.svc/entity/P1 (second row in the results in the screenshot above), I see the following in Firefox.

image

When I click in the link http://wikibase.svc/entity/Q1 (third row in the results in the screenshot above), I see the following in Firefox.

image

The question

How to change the HOST that is used for the entities in WDQS?

I would expect these URLs to be http://localhost/entity/Q1 and http://localhost/entity/P1 instead of http://wikibase.svc/entity/P1 and http://wikibase.svc/entity/Q1.

@rodrigomorales1
Copy link
Author

rodrigomorales1 commented Nov 23, 2022

Some external references

  • This post in addshore.com describes how to change the concept URI of an existing Wikibase.
  • Someone asked this exact same question in this ticket at Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant