Regex at elasticsearch


(雪中的凤凰) #1

Hi team,

I'm still new in elastic search, and i not very understand in the reference.
When i search key using POST /news/TRKD/_search?\t,
although my data do not have \t, it also can search \t.

Please kindly advice what meaning for /, , \ ,// and && at elastic search?


(Xavier Facq) #2

Hi,

Can you provide a sample of your curl queries ? Because, I don't really understand what you are searching for...


(雪中的凤凰) #3

This is my query
"POST /news/TRKD/_search?\n"

will get result as below :
{
"took": 192,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 82,
"max_score": 1,
"hits": [
{
"_index": "news",
"_type": "TRKD",
"_id": "SG_urn_newsml_reuters.com_20161117_nPNA9v4w8c",
"_score": 1,
"_source": {
"stkno": "",
"tag": [
"",
"",
""
],
"exgcode": "SG",
"exDate": "",
"paymentDate": "",
"stat": "N",
"category": "",
"CDate": "2016-11-17T03:02:17",
"RDate": "2016-11-17T03:02:17",
"htext": "Wacom(R) Cintiq(R) Pro Connects Inspiration and Expression <Origin Href="QuoteRef">6727.T ",
"content": "For best results when printing this announcement, please click on link below:<Origin Href="Link">http://pdf.reuters.com/htmlnews/htmlnews.asp?i=43059c3bf0e37541&u=urn:newsml:reuters.com:20161117:nPNA9v4w8cWacom(R) Cintiq(R) Pro Connects Inspiration and ExpressionNew digital pendisplays let artists and designers overcome limitations to live, dare, andcreatePR NewswireSINGAPORE, Nov. 17, 2016SINGAPORE, Nov. 17, 2016 /PRNewswire/ -- Today, Wacom announces the WacomCintiq Pro(<Origin Href="Link">http://www.wacom.com/en-sg/products/pen-displays/wacom-cintiq-pro) line ofcreative pen displays - the Cintiq Pro 13 and Cintiq Pro 16. The new CintiqPro bridges the gap between inspiration and expression, empoweringprofessional and serious creators of digital content to take their artistry tothe next level. Harnessing over 30 years of product innovation and customerfeedback, the Wacom Cintiq Pro wraps the most natural and precise penperformance to date into a sleek, thin and portable form factor to helpdesigners, illustrators, photographers or anyone with a passion for art tounlock their creativity.For the full multimedia release, click here:<Origin Href="Link">http://www.prnasia.com/mnr/wacom_cintiq_pro_201611.shtml "Wacom believes in our customers' limitless potential and we are dedicated tohelping them reach their creative goals by bringing art and design to life andconnecting inspiration and expression through our family of products built forcreativity," said Masahiko Yamada, President and Chief Executive Officer ofWacom. "Thanks to the Cintiq Pro's amazing pen performance and other designfeatures, people passionate about exploring creativity can effectivelytransport what's in their heart and soul to the digital canvas."Precision PenParamount to the Cintiq Pro experience is the new Pro Pen 2, offeringunmatched creative control and precision to those who take their digital artseriously. Delivering four times greater accuracy and pressure sensitivitythan the previous Pro Pen, the improved Pro Pen 2 creates an intuitive,free-flowing experience with virtually lag-free tracking on a glass surfacethat produces just the right amount of friction and is coated to reducereflection. Additionally, the new optical bonding process greatly reducesparallax, providing a pen-on-screen performance that emulates the natural feeland feedback of a traditional pen or brush. Both Cintiq Pro models alsofeature multi-touch for easy and fast navigation as well as the ability topinch, zoom and rotate illustrations, photos or models within supporting 2-Dor 3-D creative . All Rights Reserved.",
"url": ""
}
},
}

my result no have \n, why it still have result \n? or \n have others meaning?
if i search by command ""POST /news/TRKD/_search? &&a", it also will get result.


(Xavier Facq) #4

You want to find documents having an "\n" into the text, that's your query ?

You should read that : https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html

1°/ To search terms you have to build an url ending with : _search?q=your_field:something

2°/ Passing &&a in an url will be understanding like URI parameters

3°/ You'll probably have to use a more complex query like a regexp https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html

Not shure that it'll be possible to find this kind of chars using ES...


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.