Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
263 views
in Technique[技术] by (71.8m points)

Execute a elasticsearch java range query with strings?

I am very new to elasticsearch and I was wondering if there is any way to build a range query in java when I am only given strings (more specifically I am given IP addresses as strings)? The strings will look like this "IP_ADDRESS1 TO IP_ADDRESS2". As far as I can see it does not seem to be possible. In the elastic docu it says that ip addresses always have to be provided as datatype ip in order to execute a range query. However, I am not able/ allowed to change the type of the ip addresses from string to ip. Does somebody maybe know a workaround for that?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...