Questions tagged [dsl]

Domain-Specific Language is a programming language intended for a particular application domain

A domain-specific language (DSL) is a programming language intended for a particular application domain.

Well-known examples that can be considered DSLs include for markup, for statistics.

There are three key points in above mentioned definition.

  1. Programming Language: DSL is a programming language, which is used by humans to instruct a computer to do something.
  2. Limited Expressiveness: DSL is not a general purpose language like C, Java, etc. It supports minimum features needed to support its domain. Programmer cannot build entire software system using DSL.
  3. Domain focus: DSL focuses on a small domain. The limited focus makes it easy to understand and easy to use.

Martin Fowler divides DSL mainly into two categories :

  1. A External DSL : it is a standalone language with its own custom syntax, but adopting other language such as XML syntax is common. Example of external DSLs are for database queries, languages.
  2. An Internal DSL : They are intrinsically embedded inside a general-purpose language, such as Lava (hardware description language on top of ), (build system on top of ), or (structured markup language on top of ).
2200 questions
0
votes
1 answer

Is there any way no to return a document if the word present in one list

I have document below [ {'id':1, 'name': 'sachin messi', 'description': 'football@football.com', 'type': 'football', 'var':'sports'}, {'id':2, 'name': 'lionel messi', 'description': 'messi@fifa.com','type': 'soccer','var':'sports'}, {'id':3, 'name':…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

Why score is everytime is 1.0 in elasticsearch

My json is below I have to match first from sports In that i need to extract search string The issue is i am getting score 1.0 for every document [{'id':1, 'name': 'christiano ronaldo', 'description': 'football@football.com', 'type': 'football',…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

Elasticsearch DSL search query not applied on text files while searching

I have two file st.txt , sy.txt st.txt was an sy.txt football,soccer Setting is below new_player_settings = { "settings": { "index": { "analysis": { "filter": { "synonym_en": { …
sim
  • 524
  • 3
  • 14
0
votes
1 answer

How to run a command inside a docker container from a jenkins script

I have a jenkins script that looks like this: pipeline { agent { label 'machine' } stages { stage('GC Open Build') { steps { sh ''' docker run -i --rm \ …
0
votes
0 answers

Xtext - eCore model, serializer can't find the model to import

I have created a eCore model, and want to use Xtext with it. The model is called TransformationQueryLanguageModel. So I create a Xtext project from my existing model. I have configured the model as a Xtext model. However, when i generate my Dsl with…
0
votes
2 answers

How to put multiple settings in elasticsearch

My dict is below stopwords.txt have all the stopwords and synonym.txt have football,soccer abc = [ {'id':1, 'name': 'christiano ronaldo', 'description': 'football@fifa.com', 'type': 'football'}, {'id':2, 'name': 'lionel messi', 'description':…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

How to apply multiple settings in index in elasticsearch

I need to have two settings One is stopwords settings, second is synonym settings. How to add different settings applied on one index Below is stopwords setting which i need to apply on the index settings_1 = { "settings": { "index": { …
sim
  • 524
  • 3
  • 14
0
votes
1 answer

RequestError: RequestError(400, search_phase_execution_exception failed to create query For input string in elasticsearch

Below is my dictionary abc = [ {'id':"1", 'name': 'cristiano ronaldo', 'description': 'portugal@fifa.com'}, {'id':"2", 'name': 'lionel messi', 'description': 'argentina@fifa.com'}, {'id':"3", 'name': 'Lionel Jr', 'description':…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

How to combine Boolean AND with Boolean OR in Elasticsearch query?

Query: Get employee name "Mahesh" whose id is "200" and joining datetime is in a given date range and his epf status must be either 'NOK' or 'WRN'. (Possible values of epf_status are {OK,NOK,WRN,CANCELLED}. I have written the following query, that…
Manoj Agarwal
  • 365
  • 2
  • 17
0
votes
1 answer

How to get the token of words which matches in elasticsearch

I need list of values of words which matches. if my search string is abc which is theere in my name of document my expected out is just list of values [abcdef, abcdefgh, .....] myd is below [ {'id':1, 'name': 'christiano ronaldo', 'description':…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

Is sequence referred to internal DSL in Kotlin?

In book 'Kotlin in Action', it says Kotlin DSL structure is most commonly created through chained method calls. Also, a typical library consists of many methods and no context is maintained btw one call and the next. I'm confused of which side…
lolo
  • 5
  • 1
0
votes
1 answer

Settings to remove words from document is not working for elasticsearch DSL query

My dictionary is below, I have loaded the cluster [ {'id':1, 'name': 'weather report', 'description': 'Today is cooler weather'}, {'id':2, 'name': 'weather report', 'description': 'Today is hotter weather'}, {'id':3, 'name': 'weather report',…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

Remove stopwords or exclusion list while retrieving data from elasticsearch

I need to remove stop words and some words to exclude to search if i m searching for comedy i should not get anything since its in exclusion list, i have added comedy in stopwords what word i have added in stop words then i should not get that if…
sim
  • 524
  • 3
  • 14
0
votes
1 answer

Haskell Pretty Printer for Fortran

I am currently writing a transpiler from a Domain specific language to Fortran in Haskell. I have been able to implement a parser and have managed to generate an abstract syntax tree. I have reviewed this question about code generation in Haskell…
Talmsmen
  • 183
  • 1
  • 7
0
votes
1 answer

NEST elastic client on date range query

Please help me out with writing NEST query for below elastic DSL query { "query": { "range": { "date_of_birth": { "format": "yyyy", "gte": "1990", "lte": "2020" } } } } This is what I have written as…
Richi Sharma
  • 175
  • 1
  • 13
1 2 3
99
100