# Generated by Django 2.1.15 on 2020-04-20 11:37

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('elastic', '0003_index'),
        ('core', '0012_project_author'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Cluster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cluster_id', models.TextField()),
                ('document_ids', models.TextField(default='[]')),
                ('fields', models.TextField(default='[]')),
                ('display_fields', models.TextField(default='[]')),
                ('indices', models.TextField(default='[]')),
                ('significant_words', models.TextField(default='[]')),
                ('intracluster_similarity', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='ClusteringResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField()),
                ('query', models.TextField(default='{"query": {"match_all": {}}}')),
                ('clustering_algorithm', models.CharField(default='kmeans', max_length=100)),
                ('fields', models.TextField(default='[]')),
                ('display_fields', models.TextField(default='[]')),
                ('vectorizer', models.TextField(default='TfIdf Vectorizer')),
                ('num_topics', models.IntegerField(default=50)),
                ('num_cluster', models.IntegerField(default=10)),
                ('num_dims', models.IntegerField(default=1000)),
                ('document_limit', models.IntegerField(default=100)),
                ('use_lsi', models.BooleanField(default=False)),
                ('stop_words', models.TextField(default='[]')),
                ('ignored_ids', models.TextField(default='[]')),
                ('vector_model', models.FileField(default=None, null=True, upload_to='', verbose_name='')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('cluster_result', models.ManyToManyField(to='topic_analyzer.Cluster')),
                ('indices', models.ManyToManyField(to='elastic.Index')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Project')),
                ('task', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Task')),
            ],
        ),
    ]
