17 Commits

Author SHA1 Message Date
c7e87483e9 remove deprecated script: lib/tasks/deploy.rake [ci skip] 2020-12-16 01:15:35 +01:00
15dca38b8f merge with develop 2020-12-15 21:32:57 +01:00
4bf880e05b Revert "Revert "Merge pull request #465 from coopdevs/feature/switch-from-elastic-to-pg-search-la-buena""
This reverts commit 096fcce484.
2020-10-06 21:10:03 +02:00
c0071212b2 more gem updates; minor js refactor; first pass over tests and first fixes :) 2019-09-26 02:16:05 +02:00
096fcce484 Revert "Merge pull request #465 from coopdevs/feature/switch-from-elastic-to-pg-search-la-buena"
This reverts commit 9f7b99a794, reversing
changes made to ad9a8f0960.
2019-09-20 11:22:44 +02:00
6fd92f192a Remove elasticsearch and use pg_search 2019-05-24 01:21:10 +02:00
11f3667469 Add elasticsearch-rails rake tasks
This will allow importing data to ES indexes or recreating them.

We need these tasks to solve
http://community.coopdevs.org/t/busquedas-ofertas-demandas-sin-tener-en-cuenta-acentos/28/6.

Basically, the required mapping were already present in the models long
ago but the indexes were never recreated. While the `Post` model contains

```ruby
settings(
  analysis: {
    analyzer: { normal: {
        tokenizer: "standard",
        # lowercase, unaccent
        filter: %w[lowercase asciifolding]
      }
    }
  }
) do
  mapping do
    indexes :title, analyzer: "normal"
    indexes :description, analyzer: "normal"
    indexes :tags
    indexes :organization_id, type: :integer
  end
```

The offers index does not have the same settings:

```shell
{
  "offers": {
    "aliases": {},
    "mappings": {
      "offer": {
        "properties": {
          "description": {
            "type": "string"
          },
          "organization_id": {
            "type": "long"
          },
          "tags": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      }
    },
    "settings": {
      "index": {
        "creation_date": "1484923146831",
        "uuid": "-3bRUbzeRxC5MRcVKwWsjQ",
        "number_of_replicas": "1",
        "number_of_shards": "5",
        "version": {
          "created": "2020099"
        }
      }
    },
    "warmers": {}
  }
}
```

After running:

```shell
$ bundle exec rake environment elasticsearch:import:model CLASS='Offer' FORCE=y
```

The index reflects the new analyzer and mappings:

```shell
{
  "offers": {
    "aliases": {},
    "mappings": {
      "offer": {
        "properties": {
          "description": {
            "type": "string",
            "analyzer": "normal"
          },
          "organization_id": {
            "type": "integer"
          },
          "tags": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "analyzer": "normal"
          }
        }
      }
    },
    "settings": {
      "index": {
        "creation_date": "1501241709326",
        "uuid": "ypU9Nws-SMu8KJ5MdUs8Aw",
        "analysis": {
          "analyzer": {
            "normal": {
              "filter": [
                "lowercase",
                "asciifolding"
              ],
              "tokenizer": "standard"
            }
          }
        },
        "number_of_replicas": "1",
        "number_of_shards": "5",
        "version": {
          "created": "2020099"
        }
      }
    },
    "warmers": {}
  }
}
```
2017-07-28 13:55:10 +02:00
55b62cd0e3 Templates: Removed generated scaffold for simple_form 2016-05-16 05:48:42 +02:00
2188c7f269 rake-based after-deploy hook - gems are not available outside it 2014-07-10 14:48:13 +02:00
f197d85a59 Remove persona. Bye bye. 2013-12-27 20:59:37 +01:00
25a7a3c840 Summer work. Who knows what happened? 2013-10-08 21:33:02 +02:00
c4c859f1d2 Added extended Persona configuration
ENV['PERSONA_AUDIENCE'] can now contain several audiences, and the
`authenticate` method may ask for a specific audience.
2013-07-23 12:55:34 +02:00
d7b516962c Extract persona code from user. 2013-07-22 16:47:41 +02:00
8c581f3c53 added tags to posts, and skills + need to users 2013-06-21 12:59:33 +02:00
158b1f2029 More categories :) 2013-05-13 18:53:40 +02:00
bd9bde4ac0 rails4 is not mature enough for us 2012-11-04 09:50:52 +01:00
fbddf419fe inital app skeleton 2012-10-24 10:04:29 +02:00