Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:34:45+00:00 2026-06-16T04:34:45+00:00

I am trying to get instances that contains keywords using bif:contains , but I

  • 0

I am trying to get instances that contains keywords using bif:contains, but I want to get only one label for each ?s (instance) and I don’t care which one. I can’t filter it with something like regex because it’s for a general query. This is my query but it gets all labels from each instance (?s):

SELECT DISTINCT ?s,?o1,?sc,?l WHERE {
  ?s ?s1textp ?o1 .
  ?o1 bif:contains ' (madrid AND embargo) ' OPTION ( score ?sc ) . 
  ?s <http://www.w3.org/2000/01/rdf-schema#label> ?l      
}
ORDER BY DESC ( ?sc )
LIMIT 30
OFFSET 0

I tried out with nested queries, but when I add a LIMIT I get no results.

SELECT DISTINCT ?s,?o1,?sc,?l WHERE {
  ?s ?s1textp ?o1 .   
  ?o1 bif:contains ' (madrid AND embargo) ' OPTION ( score ?sc ) .                 
  {
    SELECT DISTINCT ?s,?l WHERE {
      ?s <http://www.w3.org/2000/01/rdf-schema#label> ?l
    }
    LIMIT 1
  }      
}
ORDER BY DESC ( ?sc )
LIMIT 30
OFFSET 0

I saw also the SAMPLE aggregate function; it takes exactly what I want in DBpedia endpoint, but it’s not working on my own Virtuoso! (I’m using the open source version.)

SELECT DISTINCT ?s,?o1,?sc,?l WHERE {
  ?s ?s1textp ?o1 .
  ?o1 bif:contains ' (madrid AND embargo) ' OPTION ( score ?sc ) . 
  {
    SELECT DISTINCT ?s,(SAMPLE(?l) AS ?l) WHERE {
      ?s <http://www.w3.org/2000/01/rdf-schema#label> ?l
    }
    GROUP BY ?s
  }
}
ORDER BY desc ( ?sc )
LIMIT 30
OFFSET 0
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:34:46+00:00Added an answer on June 16, 2026 at 4:34 am

    The official DBpedia endpoint is running on Virtuoso, so if that’s doing the right thing, you probably just need to update your own Virtuoso instance. VOS is currently at 7.2.2 (or 6.1.8, if you must stay on v6) 6.1.6, and the Virtuoso Github space (instructions) holds the latest code cuts in stable/7 and develop/7 (and stable/6 and develop/6), each of which delivers what the path suggests.

    For the future — questions specifically regarding Virtuoso are generally best raised on the public OpenLink Discussion Forums, the Virtuoso Users mailing list, or a confidential Support Case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I am trying to do is to get instance of Doctrine EM (using
I am trying to get a WCF service to return a List that contains
I'm trying to get unique IDs for object instances in PHP 5+. The function,
I'm trying to get the instance name of my class. The way I do
I have sugar crm instance and i was trying to get some data from
I'm trying to decode a JSON with jQuery. Here's what I get (for instance
Talking about javax.crypto.Cipher I was trying to encrypt data using Cipher.getInstance(RSA/None/NoPadding, BC) but I
Well im trying to create a custom container class that contains in my case
I'm trying to find the name of the class that contains method code. In
I am trying to serialize a list that contains non-system types. Below is my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.