Posts

Showing posts from March 24, 2019

Change Field index to not_analyzed through hive external table

Image
0 I am indexing data to ES through hive by using the query : CREATE EXTERNAL TABLE json2 ( time_id_1 STRING, acnt_nm) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'es_testing/test', 'es.nodes' = 'xxx'); insert overwrite table json2 select time_id_1 , acnt_nm from table_x; I want my string column acnt_nm to be "not analyzed". I found out there is a way of doing this through Mapping API by setting the "index": "not_analyzed" I know this can be done through explicit mapping. But that is very cumbersome as i will have to do that every time before indexing any new data. But can i do the same through the hive external table creation command ? Or maybe just edit the index to "not_analyzed&

Generating adjacency matrices from isomorphic graphs

Image
2 Here are some isomorphic graphs and their corresponding adjacency matrices. I can draw the graphs with tikz. But I'm not sure the best way to draw the matrices. Is it possible to generate one from the other? What's the right way to approach it? Here's an example of the code to generate a graph: documentclass{standalone} usepackage{tikz} begin{document} begin{tikzpicture} tikzset{Bullet/.style={circle,draw,fill=black,scale=0.75}} node[Bullet,label=left :{$e_1$}] (E1) at (0,2) {} ; node[Bullet,label=above:{$e_2$}] (E2) at (1,3) {} ; node[Bullet,label=right:{$e_3$}] (E3) at (2,2) {} ; node[Bullet,label=right:{$e_4$}] (E4) at (2,0) {} ; node[Bullet,label=left :{$e_5$}] (E5) at (0,0) {} ; draw[thick] (E1)--(E2)--(E3)--(E4)--(E5)--(E1) {} ; end{tikzpicture} end{document}