Yes, yes! Welcome! You haven't made a mistake, you are in your beloved InterSystems Developer Community in Spanish.
You may be wondering what the title of this article is about, well it's very simple, today we are gathered here to honor the Inquisitor and praise the great work he performed.
So, who or what is the Inquisitor?
Perfect, now that I have your attention, it's time to explain what the Inquisitor is. The Inquisitor is a solution developed with InterSystems technology to subject public contracts published daily on the platform https://contrataciondelestado.es/ to scrutiny.
Although the platform has a search engine enabled to filter public tenders, it had several limitations:
- It is impossible to perform searches by the tender title.
- The search by awardees depends on knowing the exact description used in the registration of the same in the tender result, which invariably varies from one to another (I have found InterSystems written in 5 different ways).
- Finding the agency that published the tender is worthy of a Where's Waldo in the Public Administration book.
And needless to say, it is impossible to obtain even the slightest statistic regarding the bidding processes.
How does the Inquisitor work?
Very simply put, the public procurement platform generously provides the public with daily downloads of the tenders published on the platform in XML format like this:
<entry>
        <id>https://contrataciondelestado.es/sindicacion/licitacionesPerfilContratante/13983936</id>
        <link href="https://contrataciondelestado.es/wps/poc?uri=deeplink:detalle_licitacion&idEvl=Ag4n4m84LtCqb7rCcv76BA%3D%3D"/>
        <summary type="text">Id licitación: 2023/20; Órgano de Contratación: Parlamento de Andalucía; Importe: 99750 EUR; Estado: EV</summary>
        <title>Suministro de equipamiento para el trabajo de trabajo en movilidad del Parlamento de Andalucía.</title>
        <updated>2024-01-31T12:59:50.514+01:00</updated>
        <cac-place-ext:ContractFolderStatus>
            <cbc:ContractFolderID>2023/20</cbc:ContractFolderID>
            <cbc-place-ext:ContractFolderStatusCode listURI="https://contrataciondelestado.es/codice/cl/2.04/SyndicationContractFolderStatusCode-2.04.gc" languageID="es">EV</cbc-place-ext:ContractFolderStatusCode>
            <cac-place-ext:LocatedContractingParty>
                <cbc:ContractingPartyTypeCode listURI="http://contrataciondelestado.es/codice/cl/2.10/ContractingAuthorityCode-2.10.gc">2</cbc:ContractingPartyTypeCode>
                <cbc:ActivityCode listURI="http://contrataciondelestado.es/codice/cl/2.10/ContractingAuthorityActivityCode-2.10.gc">1</cbc:ActivityCode>
                <cbc:BuyerProfileURIID>https://contrataciondelestado.es/wps/poc?uri=deeplink:perfilContratante&idBp=SI5CV24QS6s%3D</cbc:BuyerProfileURIID>
                <cac:Party>
                    <cbc:WebsiteURI>http://www.parlamentodeandalucia.es</cbc:WebsiteURI>
                    <cac:PartyIdentification>
                        <cbc:ID schemeName="DIR3">I00000175</cbc:ID>
                    </cac:PartyIdentification>
                    <cac:PartyIdentification>
                        <cbc:ID schemeName="NIF">S4133001J</cbc:ID>
                    </cac:PartyIdentification>
                    <cac:PartyIdentification>
                        <cbc:ID schemeName="ID_PLATAFORMA">20015840002647</cbc:ID>
                    </cac:PartyIdentification>You can access the files from this URL .
The Inquisitor connects daily to the URL that downloads the file and maps it to its own database, extracting the most useful data from it, such as the description, the amount, publication dates as well as the winner and the amount in the case of being awarded.
This information can be accessed from an Angular application developed for this purpose:
.png)
What does InterSystems IRIS bring to the Inquisitor?
So far, the functionalities presented couldn't be simpler and could be implemented with any technology, but thanks to IRIS, we don't have to settle for these basic features. Let's see how IRIS enhances and improves our Inquisitor.
Columnar storage for statistics
The platform currently stores 874,534 tenders, both published and awarded (and growing). While the number of records could affect the statistical analysis, the columnar storage of the award amount column dramatically reduces search and aggregation times.
Property Ganador As %String(MAXLEN = 200);
Property GanadorNIF As %String(MAXLEN = 200);
Property ImporteGanador As %Numeric(STORAGEDEFAULT = "columnar");
Property ImporteGanadorSinImpuestos As %Numeric(STORAGEDEFAULT = "columnar");In this way, we can quickly and immediately search for the aggregated award amounts by winning companies, contracting body, and publication years.
.png)
Text indexing with %iFind
Searching using text fields can be a real pain, as it involves queries that use "LIKE" as well as special characters like "%" or "?", which can slow down the results indefinitely. This isn't a problem when working with IRIS thanks to indexing with %iFind (more information here ).
Index IndexTitulo On (Titulo) As %iFind.Index.Basic(INDEXOPTION = 0, LANGUAGE = "es");This type of index allows you to index text fields, which dramatically speeds up searches on them, saving processing time and, most importantly, not exhausting our patience.
Here we can see an example of a search for contract awards for the acquisition of sausages, which took less than 1 second:
.png)
Vectorization of tender titles
Sometimes we may not be entirely sure of the description used for the title of the tenders, so we have taken advantage of the vector storage capabilities of the database to vectorize the titles and allow searches based on vector proximity, obtaining results that approximate the search performed.
Property TituloVectorizado As %Vector(DATATYPE = "DECIMAL", LEN = 384);Conclusions
As you can see, what may initially seem like a basic application can be greatly improved and optimized thanks to InterSystems IRIS, making use of the many functionalities and capabilities included.
Are you experiencing bottlenecks or performance issues in your applications? Check out InterSystems IRIS!
The application is available on GitHub alongside this article. It uses the Community version of InterSystems IRIS, so you can use it for free, with the only limitation being the database size.
We currently have a public version available which you can access (by requesting it by leaving a comment on this article).



